//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_spi(SotoInternal) import SotoCore

extension EMR {
    // MARK: Enums

    public enum ActionOnFailure: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case `continue` = "CONTINUE"
        case cancelAndWait = "CANCEL_AND_WAIT"
        case terminateCluster = "TERMINATE_CLUSTER"
        case terminateJobFlow = "TERMINATE_JOB_FLOW"
        public var description: String { return self.rawValue }
    }

    public enum AdjustmentType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case changeInCapacity = "CHANGE_IN_CAPACITY"
        case exactCapacity = "EXACT_CAPACITY"
        case percentChangeInCapacity = "PERCENT_CHANGE_IN_CAPACITY"
        public var description: String { return self.rawValue }
    }

    public enum AuthMode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case iam = "IAM"
        case sso = "SSO"
        public var description: String { return self.rawValue }
    }

    public enum AutoScalingPolicyState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case attached = "ATTACHED"
        case attaching = "ATTACHING"
        case detached = "DETACHED"
        case detaching = "DETACHING"
        case failed = "FAILED"
        case pending = "PENDING"
        public var description: String { return self.rawValue }
    }

    public enum AutoScalingPolicyStateChangeReasonCode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case cleanupFailure = "CLEANUP_FAILURE"
        case provisionFailure = "PROVISION_FAILURE"
        case userRequest = "USER_REQUEST"
        public var description: String { return self.rawValue }
    }

    public enum CancelStepsRequestStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case failed = "FAILED"
        case submitted = "SUBMITTED"
        public var description: String { return self.rawValue }
    }

    public enum ClusterState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case bootstrapping = "BOOTSTRAPPING"
        case running = "RUNNING"
        case starting = "STARTING"
        case terminated = "TERMINATED"
        case terminatedWithErrors = "TERMINATED_WITH_ERRORS"
        case terminating = "TERMINATING"
        case waiting = "WAITING"
        public var description: String { return self.rawValue }
    }

    public enum ClusterStateChangeReasonCode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case allStepsCompleted = "ALL_STEPS_COMPLETED"
        case bootstrapFailure = "BOOTSTRAP_FAILURE"
        case instanceFailure = "INSTANCE_FAILURE"
        case instanceFleetTimeout = "INSTANCE_FLEET_TIMEOUT"
        case internalError = "INTERNAL_ERROR"
        case stepFailure = "STEP_FAILURE"
        case userRequest = "USER_REQUEST"
        case validationError = "VALIDATION_ERROR"
        public var description: String { return self.rawValue }
    }

    public enum ComparisonOperator: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case greaterThan = "GREATER_THAN"
        case greaterThanOrEqual = "GREATER_THAN_OR_EQUAL"
        case lessThan = "LESS_THAN"
        case lessThanOrEqual = "LESS_THAN_OR_EQUAL"
        public var description: String { return self.rawValue }
    }

    public enum ComputeLimitsUnitType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case instanceFleetUnits = "InstanceFleetUnits"
        case instances = "Instances"
        case vcpu = "VCPU"
        public var description: String { return self.rawValue }
    }

    public enum ExecutionEngineType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case emr = "EMR"
        public var description: String { return self.rawValue }
    }

    public enum IdcUserAssignment: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case optional = "OPTIONAL"
        case required = "REQUIRED"
        public var description: String { return self.rawValue }
    }

    public enum IdentityType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case group = "GROUP"
        case user = "USER"
        public var description: String { return self.rawValue }
    }

    public enum InstanceCollectionType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case instanceFleet = "INSTANCE_FLEET"
        case instanceGroup = "INSTANCE_GROUP"
        public var description: String { return self.rawValue }
    }

    public enum InstanceFleetState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case bootstrapping = "BOOTSTRAPPING"
        case provisioning = "PROVISIONING"
        case resizing = "RESIZING"
        case running = "RUNNING"
        case suspended = "SUSPENDED"
        case terminated = "TERMINATED"
        case terminating = "TERMINATING"
        public var description: String { return self.rawValue }
    }

    public enum InstanceFleetStateChangeReasonCode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case clusterTerminated = "CLUSTER_TERMINATED"
        case instanceFailure = "INSTANCE_FAILURE"
        case internalError = "INTERNAL_ERROR"
        case validationError = "VALIDATION_ERROR"
        public var description: String { return self.rawValue }
    }

    public enum InstanceFleetType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case core = "CORE"
        case master = "MASTER"
        case task = "TASK"
        public var description: String { return self.rawValue }
    }

    public enum InstanceGroupState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case arrested = "ARRESTED"
        case bootstrapping = "BOOTSTRAPPING"
        case ended = "ENDED"
        case provisioning = "PROVISIONING"
        case reconfiguring = "RECONFIGURING"
        case resizing = "RESIZING"
        case running = "RUNNING"
        case shuttingDown = "SHUTTING_DOWN"
        case suspended = "SUSPENDED"
        case terminated = "TERMINATED"
        case terminating = "TERMINATING"
        public var description: String { return self.rawValue }
    }

    public enum InstanceGroupStateChangeReasonCode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case clusterTerminated = "CLUSTER_TERMINATED"
        case instanceFailure = "INSTANCE_FAILURE"
        case internalError = "INTERNAL_ERROR"
        case validationError = "VALIDATION_ERROR"
        public var description: String { return self.rawValue }
    }

    public enum InstanceGroupType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case core = "CORE"
        case master = "MASTER"
        case task = "TASK"
        public var description: String { return self.rawValue }
    }

    public enum InstanceRoleType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case core = "CORE"
        case master = "MASTER"
        case task = "TASK"
        public var description: String { return self.rawValue }
    }

    public enum InstanceState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case awaitingFulfillment = "AWAITING_FULFILLMENT"
        case bootstrapping = "BOOTSTRAPPING"
        case provisioning = "PROVISIONING"
        case running = "RUNNING"
        case terminated = "TERMINATED"
        public var description: String { return self.rawValue }
    }

    public enum InstanceStateChangeReasonCode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case bootstrapFailure = "BOOTSTRAP_FAILURE"
        case clusterTerminated = "CLUSTER_TERMINATED"
        case instanceFailure = "INSTANCE_FAILURE"
        case internalError = "INTERNAL_ERROR"
        case validationError = "VALIDATION_ERROR"
        public var description: String { return self.rawValue }
    }

    public enum JobFlowExecutionState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case bootstrapping = "BOOTSTRAPPING"
        case completed = "COMPLETED"
        case failed = "FAILED"
        case running = "RUNNING"
        case shuttingDown = "SHUTTING_DOWN"
        case starting = "STARTING"
        case terminated = "TERMINATED"
        case waiting = "WAITING"
        public var description: String { return self.rawValue }
    }

    public enum MarketType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case onDemand = "ON_DEMAND"
        case spot = "SPOT"
        public var description: String { return self.rawValue }
    }

    public enum NotebookExecutionStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case failed = "FAILED"
        case failing = "FAILING"
        case finished = "FINISHED"
        case finishing = "FINISHING"
        case running = "RUNNING"
        case startPending = "START_PENDING"
        case starting = "STARTING"
        case stopPending = "STOP_PENDING"
        case stopped = "STOPPED"
        case stopping = "STOPPING"
        public var description: String { return self.rawValue }
    }

    public enum OnClusterAppUIType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case applicationMaster = "ApplicationMaster"
        case jobHistoryServer = "JobHistoryServer"
        case resourceManager = "ResourceManager"
        case sparkHistoryServer = "SparkHistoryServer"
        case tezUI = "TezUI"
        case yarnTimelineService = "YarnTimelineService"
        public var description: String { return self.rawValue }
    }

    public enum OnDemandCapacityReservationPreference: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case none = "none"
        case open = "open"
        public var description: String { return self.rawValue }
    }

    public enum OnDemandCapacityReservationUsageStrategy: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case useCapacityReservationsFirst = "use-capacity-reservations-first"
        public var description: String { return self.rawValue }
    }

    public enum OnDemandProvisioningAllocationStrategy: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case lowestPrice = "lowest-price"
        case prioritized = "prioritized"
        public var description: String { return self.rawValue }
    }

    public enum OutputNotebookFormat: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case html = "HTML"
        public var description: String { return self.rawValue }
    }

    public enum PersistentAppUIType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case shs = "SHS"
        case tez = "TEZ"
        case yts = "YTS"
        public var description: String { return self.rawValue }
    }

    public enum PlacementGroupStrategy: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case cluster = "CLUSTER"
        case none = "NONE"
        case partition = "PARTITION"
        case spread = "SPREAD"
        public var description: String { return self.rawValue }
    }

    public enum ProfilerType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case shs = "SHS"
        case tezui = "TEZUI"
        case yts = "YTS"
        public var description: String { return self.rawValue }
    }

    public enum ReconfigurationType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case merge = "MERGE"
        case overwrite = "OVERWRITE"
        public var description: String { return self.rawValue }
    }

    public enum RepoUpgradeOnBoot: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case none = "NONE"
        case security = "SECURITY"
        public var description: String { return self.rawValue }
    }

    public enum ScaleDownBehavior: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case terminateAtInstanceHour = "TERMINATE_AT_INSTANCE_HOUR"
        case terminateAtTaskCompletion = "TERMINATE_AT_TASK_COMPLETION"
        public var description: String { return self.rawValue }
    }

    public enum ScalingStrategy: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case `default` = "DEFAULT"
        case advanced = "ADVANCED"
        public var description: String { return self.rawValue }
    }

    public enum SpotProvisioningAllocationStrategy: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case capacityOptimized = "capacity-optimized"
        case capacityOptimizedPrioritized = "capacity-optimized-prioritized"
        case diversified = "diversified"
        case lowestPrice = "lowest-price"
        case priceCapacityOptimized = "price-capacity-optimized"
        public var description: String { return self.rawValue }
    }

    public enum SpotProvisioningTimeoutAction: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case switchToOnDemand = "SWITCH_TO_ON_DEMAND"
        case terminateCluster = "TERMINATE_CLUSTER"
        public var description: String { return self.rawValue }
    }

    public enum Statistic: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case average = "AVERAGE"
        case maximum = "MAXIMUM"
        case minimum = "MINIMUM"
        case sampleCount = "SAMPLE_COUNT"
        case sum = "SUM"
        public var description: String { return self.rawValue }
    }

    public enum StepCancellationOption: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case sendInterrupt = "SEND_INTERRUPT"
        case terminateProcess = "TERMINATE_PROCESS"
        public var description: String { return self.rawValue }
    }

    public enum StepExecutionState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case `continue` = "CONTINUE"
        case cancelled = "CANCELLED"
        case completed = "COMPLETED"
        case failed = "FAILED"
        case interrupted = "INTERRUPTED"
        case pending = "PENDING"
        case running = "RUNNING"
        public var description: String { return self.rawValue }
    }

    public enum StepState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case cancelPending = "CANCEL_PENDING"
        case cancelled = "CANCELLED"
        case completed = "COMPLETED"
        case failed = "FAILED"
        case interrupted = "INTERRUPTED"
        case pending = "PENDING"
        case running = "RUNNING"
        public var description: String { return self.rawValue }
    }

    public enum StepStateChangeReasonCode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case none = "NONE"
        public var description: String { return self.rawValue }
    }

    public enum Unit: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case bits = "BITS"
        case bitsPerSecond = "BITS_PER_SECOND"
        case bytes = "BYTES"
        case bytesPerSecond = "BYTES_PER_SECOND"
        case count = "COUNT"
        case countPerSecond = "COUNT_PER_SECOND"
        case gigaBits = "GIGA_BITS"
        case gigaBitsPerSecond = "GIGA_BITS_PER_SECOND"
        case gigaBytes = "GIGA_BYTES"
        case gigaBytesPerSecond = "GIGA_BYTES_PER_SECOND"
        case kiloBits = "KILO_BITS"
        case kiloBitsPerSecond = "KILO_BITS_PER_SECOND"
        case kiloBytes = "KILO_BYTES"
        case kiloBytesPerSecond = "KILO_BYTES_PER_SECOND"
        case megaBits = "MEGA_BITS"
        case megaBitsPerSecond = "MEGA_BITS_PER_SECOND"
        case megaBytes = "MEGA_BYTES"
        case megaBytesPerSecond = "MEGA_BYTES_PER_SECOND"
        case microSeconds = "MICRO_SECONDS"
        case milliSeconds = "MILLI_SECONDS"
        case none = "NONE"
        case percent = "PERCENT"
        case seconds = "SECONDS"
        case teraBits = "TERA_BITS"
        case teraBitsPerSecond = "TERA_BITS_PER_SECOND"
        case teraBytes = "TERA_BYTES"
        case teraBytesPerSecond = "TERA_BYTES_PER_SECOND"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AddInstanceFleetInput: AWSEncodableShape {
        /// The unique identifier of the cluster.
        public let clusterId: String?
        /// Specifies the configuration of the instance fleet.
        public let instanceFleet: InstanceFleetConfig?

        @inlinable
        public init(clusterId: String? = nil, instanceFleet: InstanceFleetConfig? = nil) {
            self.clusterId = clusterId
            self.instanceFleet = instanceFleet
        }

        public func validate(name: String) throws {
            try self.validate(self.clusterId, name: "clusterId", parent: name, max: 256)
            try self.validate(self.clusterId, name: "clusterId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.instanceFleet?.validate(name: "\(name).instanceFleet")
        }

        private enum CodingKeys: String, CodingKey {
            case clusterId = "ClusterId"
            case instanceFleet = "InstanceFleet"
        }
    }

    public struct AddInstanceFleetOutput: AWSDecodableShape {
        /// The Amazon Resource Name of the cluster.
        public let clusterArn: String?
        /// The unique identifier of the cluster.
        public let clusterId: String?
        /// The unique identifier of the instance fleet.
        public let instanceFleetId: String?

        @inlinable
        public init(clusterArn: String? = nil, clusterId: String? = nil, instanceFleetId: String? = nil) {
            self.clusterArn = clusterArn
            self.clusterId = clusterId
            self.instanceFleetId = instanceFleetId
        }

        private enum CodingKeys: String, CodingKey {
            case clusterArn = "ClusterArn"
            case clusterId = "ClusterId"
            case instanceFleetId = "InstanceFleetId"
        }
    }

    public struct AddInstanceGroupsInput: AWSEncodableShape {
        /// Instance groups to add.
        public let instanceGroups: [InstanceGroupConfig]?
        /// Job flow in which to add the instance groups.
        public let jobFlowId: String?

        @inlinable
        public init(instanceGroups: [InstanceGroupConfig]? = nil, jobFlowId: String? = nil) {
            self.instanceGroups = instanceGroups
            self.jobFlowId = jobFlowId
        }

        public func validate(name: String) throws {
            try self.instanceGroups?.forEach {
                try $0.validate(name: "\(name).instanceGroups[]")
            }
            try self.validate(self.jobFlowId, name: "jobFlowId", parent: name, max: 256)
            try self.validate(self.jobFlowId, name: "jobFlowId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case instanceGroups = "InstanceGroups"
            case jobFlowId = "JobFlowId"
        }
    }

    public struct AddInstanceGroupsOutput: AWSDecodableShape {
        /// The Amazon Resource Name of the cluster.
        public let clusterArn: String?
        /// Instance group IDs of the newly created instance groups.
        public let instanceGroupIds: [String]?
        /// The job flow ID in which the instance groups are added.
        public let jobFlowId: String?

        @inlinable
        public init(clusterArn: String? = nil, instanceGroupIds: [String]? = nil, jobFlowId: String? = nil) {
            self.clusterArn = clusterArn
            self.instanceGroupIds = instanceGroupIds
            self.jobFlowId = jobFlowId
        }

        private enum CodingKeys: String, CodingKey {
            case clusterArn = "ClusterArn"
            case instanceGroupIds = "InstanceGroupIds"
            case jobFlowId = "JobFlowId"
        }
    }

    public struct AddJobFlowStepsInput: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the runtime role for a step on the cluster. The runtime role can be a cross-account IAM role. The runtime role ARN is a combination of account ID, role name, and role type using the following format: arn:partition:service:region:account:resource.  For example, arn:aws:IAM::1234567890:role/ReadOnly is a correctly formatted runtime role ARN.
        public let executionRoleArn: String?
        /// A string that uniquely identifies the job flow. This identifier is returned by RunJobFlow and can also be obtained from ListClusters.
        public let jobFlowId: String?
        ///  A list of StepConfig to be executed by the job flow.
        public let steps: [StepConfig]?

        @inlinable
        public init(executionRoleArn: String? = nil, jobFlowId: String? = nil, steps: [StepConfig]? = nil) {
            self.executionRoleArn = executionRoleArn
            self.jobFlowId = jobFlowId
            self.steps = steps
        }

        public func validate(name: String) throws {
            try self.validate(self.executionRoleArn, name: "executionRoleArn", parent: name, max: 2048)
            try self.validate(self.executionRoleArn, name: "executionRoleArn", parent: name, min: 20)
            try self.validate(self.jobFlowId, name: "jobFlowId", parent: name, max: 256)
            try self.validate(self.jobFlowId, name: "jobFlowId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.steps?.forEach {
                try $0.validate(name: "\(name).steps[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case executionRoleArn = "ExecutionRoleArn"
            case jobFlowId = "JobFlowId"
            case steps = "Steps"
        }
    }

    public struct AddJobFlowStepsOutput: AWSDecodableShape {
        /// The identifiers of the list of steps added to the job flow.
        public let stepIds: [String]?

        @inlinable
        public init(stepIds: [String]? = nil) {
            self.stepIds = stepIds
        }

        private enum CodingKeys: String, CodingKey {
            case stepIds = "StepIds"
        }
    }

    public struct AddTagsInput: AWSEncodableShape {
        /// The Amazon EMR resource identifier to which tags will be added. For example, a cluster identifier or an Amazon EMR Studio ID.
        public let resourceId: String?
        /// A list of tags to associate with a resource. Tags are user-defined key-value pairs that consist of a required key string with a maximum of 128 characters, and an optional value string with a maximum of 256 characters.
        public let tags: [Tag]?

        @inlinable
        public init(resourceId: String? = nil, tags: [Tag]? = nil) {
            self.resourceId = resourceId
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case resourceId = "ResourceId"
            case tags = "Tags"
        }
    }

    public struct AddTagsOutput: AWSDecodableShape {
        public init() {}
    }

    public struct Application: AWSEncodableShape & AWSDecodableShape {
        /// This option is for advanced users only. This is meta information about third-party applications that third-party vendors use for testing purposes.
        public let additionalInfo: [String: String]?
        /// Arguments for Amazon EMR to pass to the application.
        public let args: [String]?
        /// The name of the application.
        public let name: String?
        /// The version of the application.
        public let version: String?

        @inlinable
        public init(additionalInfo: [String: String]? = nil, args: [String]? = nil, name: String? = nil, version: String? = nil) {
            self.additionalInfo = additionalInfo
            self.args = args
            self.name = name
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case additionalInfo = "AdditionalInfo"
            case args = "Args"
            case name = "Name"
            case version = "Version"
        }
    }

    public struct AutoScalingPolicy: AWSEncodableShape {
        /// The upper and lower Amazon EC2 instance limits for an automatic scaling policy. Automatic scaling activity will not cause an instance group to grow above or below these limits.
        public let constraints: ScalingConstraints?
        /// The scale-in and scale-out rules that comprise the automatic scaling policy.
        public let rules: [ScalingRule]?

        @inlinable
        public init(constraints: ScalingConstraints? = nil, rules: [ScalingRule]? = nil) {
            self.constraints = constraints
            self.rules = rules
        }

        public func validate(name: String) throws {
            try self.rules?.forEach {
                try $0.validate(name: "\(name).rules[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case constraints = "Constraints"
            case rules = "Rules"
        }
    }

    public struct AutoScalingPolicyDescription: AWSDecodableShape {
        /// The upper and lower Amazon EC2 instance limits for an automatic scaling policy. Automatic scaling activity will not cause an instance group to grow above or below these limits.
        public let constraints: ScalingConstraints?
        /// The scale-in and scale-out rules that comprise the automatic scaling policy.
        public let rules: [ScalingRule]?
        /// The status of an automatic scaling policy.
        public let status: AutoScalingPolicyStatus?

        @inlinable
        public init(constraints: ScalingConstraints? = nil, rules: [ScalingRule]? = nil, status: AutoScalingPolicyStatus? = nil) {
            self.constraints = constraints
            self.rules = rules
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case constraints = "Constraints"
            case rules = "Rules"
            case status = "Status"
        }
    }

    public struct AutoScalingPolicyStateChangeReason: AWSDecodableShape {
        /// The code indicating the reason for the change in status.USER_REQUEST indicates that the scaling policy status was changed by a user. PROVISION_FAILURE indicates that the status change was because the policy failed to provision. CLEANUP_FAILURE indicates an error.
        public let code: AutoScalingPolicyStateChangeReasonCode?
        /// A friendly, more verbose message that accompanies an automatic scaling policy state change.
        public let message: String?

        @inlinable
        public init(code: AutoScalingPolicyStateChangeReasonCode? = nil, message: String? = nil) {
            self.code = code
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case code = "Code"
            case message = "Message"
        }
    }

    public struct AutoScalingPolicyStatus: AWSDecodableShape {
        /// Indicates the status of the automatic scaling policy.
        public let state: AutoScalingPolicyState?
        /// The reason for a change in status.
        public let stateChangeReason: AutoScalingPolicyStateChangeReason?

        @inlinable
        public init(state: AutoScalingPolicyState? = nil, stateChangeReason: AutoScalingPolicyStateChangeReason? = nil) {
            self.state = state
            self.stateChangeReason = stateChangeReason
        }

        private enum CodingKeys: String, CodingKey {
            case state = "State"
            case stateChangeReason = "StateChangeReason"
        }
    }

    public struct AutoTerminationPolicy: AWSEncodableShape & AWSDecodableShape {
        /// Specifies the amount of idle time in seconds after which the cluster automatically terminates. You can specify a minimum of 60 seconds and a maximum of 604800 seconds (seven days).
        public let idleTimeout: Int64?

        @inlinable
        public init(idleTimeout: Int64? = nil) {
            self.idleTimeout = idleTimeout
        }

        private enum CodingKeys: String, CodingKey {
            case idleTimeout = "IdleTimeout"
        }
    }

    public struct BlockPublicAccessConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Indicates whether Amazon EMR block public access is enabled (true) or disabled (false). By default, the value is false for accounts that have created Amazon EMR clusters before July 2019. For accounts created after this, the default is true.
        public let blockPublicSecurityGroupRules: Bool?
        /// The classification within a configuration.
        public let classification: String?
        /// A list of additional configurations to apply within a configuration object.
        public let configurations: [Configuration]?
        /// Specifies ports and port ranges that are permitted to have security group rules that allow inbound traffic from all public sources. For example, if Port 23 (Telnet) is specified for PermittedPublicSecurityGroupRuleRanges, Amazon EMR allows cluster creation if a security group associated with the cluster has a rule that allows inbound traffic on Port 23 from IPv4 0.0.0.0/0 or IPv6 port ::/0 as the source. By default, Port 22, which is used for SSH access to the cluster Amazon EC2 instances, is in the list of PermittedPublicSecurityGroupRuleRanges.
        public let permittedPublicSecurityGroupRuleRanges: [PortRange]?
        /// A set of properties specified within a configuration classification.
        public let properties: [String: String]?

        @inlinable
        public init(blockPublicSecurityGroupRules: Bool? = nil, classification: String? = nil, configurations: [Configuration]? = nil, permittedPublicSecurityGroupRuleRanges: [PortRange]? = nil, properties: [String: String]? = nil) {
            self.blockPublicSecurityGroupRules = blockPublicSecurityGroupRules
            self.classification = classification
            self.configurations = configurations
            self.permittedPublicSecurityGroupRuleRanges = permittedPublicSecurityGroupRuleRanges
            self.properties = properties
        }

        public func validate(name: String) throws {
            try self.permittedPublicSecurityGroupRuleRanges?.forEach {
                try $0.validate(name: "\(name).permittedPublicSecurityGroupRuleRanges[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case blockPublicSecurityGroupRules = "BlockPublicSecurityGroupRules"
            case classification = "Classification"
            case configurations = "Configurations"
            case permittedPublicSecurityGroupRuleRanges = "PermittedPublicSecurityGroupRuleRanges"
            case properties = "Properties"
        }
    }

    public struct BlockPublicAccessConfigurationMetadata: AWSDecodableShape {
        /// The Amazon Resource Name that created or last modified the configuration.
        public let createdByArn: String?
        /// The date and time that the configuration was created.
        public let creationDateTime: Date?

        @inlinable
        public init(createdByArn: String? = nil, creationDateTime: Date? = nil) {
            self.createdByArn = createdByArn
            self.creationDateTime = creationDateTime
        }

        private enum CodingKeys: String, CodingKey {
            case createdByArn = "CreatedByArn"
            case creationDateTime = "CreationDateTime"
        }
    }

    public struct BootstrapActionConfig: AWSEncodableShape & AWSDecodableShape {
        /// The name of the bootstrap action.
        public let name: String?
        /// The script run by the bootstrap action.
        public let scriptBootstrapAction: ScriptBootstrapActionConfig?

        @inlinable
        public init(name: String? = nil, scriptBootstrapAction: ScriptBootstrapActionConfig? = nil) {
            self.name = name
            self.scriptBootstrapAction = scriptBootstrapAction
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.scriptBootstrapAction?.validate(name: "\(name).scriptBootstrapAction")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case scriptBootstrapAction = "ScriptBootstrapAction"
        }
    }

    public struct BootstrapActionDetail: AWSDecodableShape {
        /// A description of the bootstrap action.
        public let bootstrapActionConfig: BootstrapActionConfig?

        @inlinable
        public init(bootstrapActionConfig: BootstrapActionConfig? = nil) {
            self.bootstrapActionConfig = bootstrapActionConfig
        }

        private enum CodingKeys: String, CodingKey {
            case bootstrapActionConfig = "BootstrapActionConfig"
        }
    }

    public struct CancelStepsInfo: AWSDecodableShape {
        /// The reason for the failure if the CancelSteps request fails.
        public let reason: String?
        /// The status of a CancelSteps Request. The value may be SUBMITTED or FAILED.
        public let status: CancelStepsRequestStatus?
        /// The encrypted StepId of a step.
        public let stepId: String?

        @inlinable
        public init(reason: String? = nil, status: CancelStepsRequestStatus? = nil, stepId: String? = nil) {
            self.reason = reason
            self.status = status
            self.stepId = stepId
        }

        private enum CodingKeys: String, CodingKey {
            case reason = "Reason"
            case status = "Status"
            case stepId = "StepId"
        }
    }

    public struct CancelStepsInput: AWSEncodableShape {
        /// The ClusterID for the specified steps that will be canceled. Use RunJobFlow and ListClusters to get ClusterIDs.
        public let clusterId: String?
        /// The option to choose to cancel RUNNING steps. By default, the value is SEND_INTERRUPT.
        public let stepCancellationOption: StepCancellationOption?
        /// The list of StepIDs to cancel. Use ListSteps to get steps and their states for the specified cluster.
        public let stepIds: [String]?

        @inlinable
        public init(clusterId: String? = nil, stepCancellationOption: StepCancellationOption? = nil, stepIds: [String]? = nil) {
            self.clusterId = clusterId
            self.stepCancellationOption = stepCancellationOption
            self.stepIds = stepIds
        }

        public func validate(name: String) throws {
            try self.validate(self.clusterId, name: "clusterId", parent: name, max: 256)
            try self.validate(self.clusterId, name: "clusterId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.stepIds?.forEach {
                try validate($0, name: "stepIds[]", parent: name, max: 256)
                try validate($0, name: "stepIds[]", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case clusterId = "ClusterId"
            case stepCancellationOption = "StepCancellationOption"
            case stepIds = "StepIds"
        }
    }

    public struct CancelStepsOutput: AWSDecodableShape {
        /// A list of CancelStepsInfo, which shows the status of specified cancel requests for each StepID specified.
        public let cancelStepsInfoList: [CancelStepsInfo]?

        @inlinable
        public init(cancelStepsInfoList: [CancelStepsInfo]? = nil) {
            self.cancelStepsInfoList = cancelStepsInfoList
        }

        private enum CodingKeys: String, CodingKey {
            case cancelStepsInfoList = "CancelStepsInfoList"
        }
    }

    public struct CloudWatchAlarmDefinition: AWSEncodableShape & AWSDecodableShape {
        /// Determines how the metric specified by MetricName is compared to the value specified by Threshold.
        public let comparisonOperator: ComparisonOperator?
        /// A CloudWatch metric dimension.
        public let dimensions: [MetricDimension]?
        /// The number of periods, in five-minute increments, during which the alarm condition must exist before the alarm triggers automatic scaling activity. The default value is 1.
        public let evaluationPeriods: Int?
        /// The name of the CloudWatch metric that is watched to determine an alarm condition.
        public let metricName: String?
        /// The namespace for the CloudWatch metric. The default is AWS/ElasticMapReduce.
        public let namespace: String?
        /// The period, in seconds, over which the statistic is applied. CloudWatch metrics for Amazon EMR are emitted every five minutes (300 seconds), so if you specify a CloudWatch metric, specify 300.
        public let period: Int?
        /// The statistic to apply to the metric associated with the alarm. The default is AVERAGE.
        public let statistic: Statistic?
        /// The value against which the specified statistic is compared.
        public let threshold: Double?
        /// The unit of measure associated with the CloudWatch metric being watched. The value specified for Unit must correspond to the units specified in the CloudWatch metric.
        public let unit: Unit?

        @inlinable
        public init(comparisonOperator: ComparisonOperator? = nil, dimensions: [MetricDimension]? = nil, evaluationPeriods: Int? = nil, metricName: String? = nil, namespace: String? = nil, period: Int? = nil, statistic: Statistic? = nil, threshold: Double? = nil, unit: Unit? = nil) {
            self.comparisonOperator = comparisonOperator
            self.dimensions = dimensions
            self.evaluationPeriods = evaluationPeriods
            self.metricName = metricName
            self.namespace = namespace
            self.period = period
            self.statistic = statistic
            self.threshold = threshold
            self.unit = unit
        }

        public func validate(name: String) throws {
            try self.validate(self.threshold, name: "threshold", parent: name, min: 0.0)
        }

        private enum CodingKeys: String, CodingKey {
            case comparisonOperator = "ComparisonOperator"
            case dimensions = "Dimensions"
            case evaluationPeriods = "EvaluationPeriods"
            case metricName = "MetricName"
            case namespace = "Namespace"
            case period = "Period"
            case statistic = "Statistic"
            case threshold = "Threshold"
            case unit = "Unit"
        }
    }

    public struct Cluster: AWSDecodableShape {
        /// The applications installed on this cluster.
        public let applications: [Application]?
        /// An IAM role for automatic scaling policies. The default role is EMR_AutoScaling_DefaultRole. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate Amazon EC2 instances in an instance group.
        public let autoScalingRole: String?
        /// Specifies whether the cluster should terminate after completing all steps.
        public let autoTerminate: Bool?
        /// The Amazon Resource Name of the cluster.
        public let clusterArn: String?
        /// Applies only to Amazon EMR releases 4.x and later. The list of configurations that are supplied to the Amazon EMR cluster.
        public let configurations: [Configuration]?
        /// Available only in Amazon EMR releases 5.7.0 and later. The ID of a custom Amazon EBS-backed Linux AMI if the cluster uses a custom AMI.
        public let customAmiId: String?
        /// The IOPS, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 6.15.0 and later.
        public let ebsRootVolumeIops: Int?
        /// The size, in GiB, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 4.x and later.
        public let ebsRootVolumeSize: Int?
        /// The throughput, in MiB/s, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 6.15.0 and later.
        public let ebsRootVolumeThroughput: Int?
        /// Provides information about the Amazon EC2 instances in a cluster grouped by category. For example, key name, subnet ID, IAM instance profile, and so on.
        public let ec2InstanceAttributes: Ec2InstanceAttributes?
        /// Reserved.
        public let extendedSupport: Bool?
        /// The unique identifier for the cluster.
        public let id: String?
        ///  The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x versions.  The instance group configuration of the cluster. A value of INSTANCE_GROUP indicates a uniform instance group configuration. A value of INSTANCE_FLEET indicates an instance fleets configuration.
        public let instanceCollectionType: InstanceCollectionType?
        /// Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration. For more information see Use Kerberos Authentication in the Amazon EMR Management Guide.
        public let kerberosAttributes: KerberosAttributes?
        ///  The KMS key used for encrypting log files. This attribute is only available with Amazon EMR 5.30.0 and later, excluding Amazon EMR 6.0.0.
        public let logEncryptionKmsKeyId: String?
        /// The path to the Amazon S3 location where logs for this cluster are stored.
        public let logUri: String?
        /// The DNS name of the master node. If the cluster is on a private subnet, this is the private DNS name. On a public subnet, this is the public DNS name.
        public let masterPublicDnsName: String?
        /// The name of the cluster. This parameter can't contain the characters , $, |, or ` (backtick).
        public let name: String?
        /// An approximation of the cost of the cluster, represented in m1.small/hours. This value is incremented one time for every hour an m1.small instance runs. Larger instances are weighted more, so an Amazon EC2 instance that is roughly four times more expensive would result in the normalized instance hours being incremented by four. This result is only an approximation and does not reflect the actual billing rate.
        public let normalizedInstanceHours: Int?
        /// The Amazon Linux release specified in a cluster launch RunJobFlow request. If no Amazon Linux release was specified, the default Amazon Linux release is shown in the response.
        public let osReleaseLabel: String?
        ///  The Amazon Resource Name (ARN) of the Outpost where the cluster is launched.
        public let outpostArn: String?
        /// Placement group configured for an Amazon EMR cluster.
        public let placementGroups: [PlacementGroupConfig]?
        /// The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster. Release labels are in the form emr-x.x.x, where x.x.x is an Amazon EMR release version such as emr-5.14.0. For more information about Amazon EMR release versions and included application versions and features, see https://docs.aws.amazon.com/emr/latest/ReleaseGuide/. The release label applies only to Amazon EMR releases version 4.0 and later. Earlier versions use AmiVersion.
        public let releaseLabel: String?
        /// Applies only when CustomAmiID is used. Specifies the type of updates that the Amazon Linux AMI package repositories apply when an instance boots using the AMI.
        public let repoUpgradeOnBoot: RepoUpgradeOnBoot?
        /// The AMI version requested for this cluster.
        public let requestedAmiVersion: String?
        /// The AMI version running on this cluster.
        public let runningAmiVersion: String?
        /// The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized. TERMINATE_AT_INSTANCE_HOUR indicates that Amazon EMR terminates nodes at the instance-hour boundary, regardless of when the request to terminate the instance was submitted. This option is only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that version. TERMINATE_AT_TASK_COMPLETION indicates that Amazon EMR adds nodes to a deny list and drains tasks from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour boundary. With either behavior, Amazon EMR removes the least active nodes first and blocks instance termination if it could lead to HDFS corruption. TERMINATE_AT_TASK_COMPLETION is available only in Amazon EMR releases 4.1.0 and later, and is the default for versions of Amazon EMR earlier than 5.1.0.
        public let scaleDownBehavior: ScaleDownBehavior?
        /// The name of the security configuration applied to the cluster.
        public let securityConfiguration: String?
        /// The IAM role that Amazon EMR assumes in order to access Amazon Web Services resources on your behalf.
        public let serviceRole: String?
        /// The current status details about the cluster.
        public let status: ClusterStatus?
        /// Specifies the number of steps that can be executed concurrently.
        public let stepConcurrencyLevel: Int?
        /// A list of tags associated with a cluster.
        public let tags: [Tag]?
        /// Indicates whether Amazon EMR will lock the cluster to prevent the Amazon EC2 instances from being terminated by an API call or user intervention, or in the event of a cluster error.
        public let terminationProtected: Bool?
        /// Indicates whether Amazon EMR should gracefully replace Amazon EC2 core instances that have degraded within the cluster.
        public let unhealthyNodeReplacement: Bool?
        /// Indicates whether the cluster is visible to IAM principals in the Amazon Web Services account associated with the cluster. When true, IAM principals in the Amazon Web Services account can perform Amazon EMR cluster actions on the cluster that their IAM policies allow. When false, only the IAM principal that created the cluster and the Amazon Web Services account root user can perform Amazon EMR actions, regardless of IAM permissions policies attached to other IAM principals. The default value is true if a value is not provided when creating a cluster using the Amazon EMR API RunJobFlow command, the CLI create-cluster command, or the Amazon Web Services Management Console.
        public let visibleToAllUsers: Bool?

        @inlinable
        public init(applications: [Application]? = nil, autoScalingRole: String? = nil, autoTerminate: Bool? = nil, clusterArn: String? = nil, configurations: [Configuration]? = nil, customAmiId: String? = nil, ebsRootVolumeIops: Int? = nil, ebsRootVolumeSize: Int? = nil, ebsRootVolumeThroughput: Int? = nil, ec2InstanceAttributes: Ec2InstanceAttributes? = nil, extendedSupport: Bool? = nil, id: String? = nil, instanceCollectionType: InstanceCollectionType? = nil, kerberosAttributes: KerberosAttributes? = nil, logEncryptionKmsKeyId: String? = nil, logUri: String? = nil, masterPublicDnsName: String? = nil, name: String? = nil, normalizedInstanceHours: Int? = nil, osReleaseLabel: String? = nil, outpostArn: String? = nil, placementGroups: [PlacementGroupConfig]? = nil, releaseLabel: String? = nil, repoUpgradeOnBoot: RepoUpgradeOnBoot? = nil, requestedAmiVersion: String? = nil, runningAmiVersion: String? = nil, scaleDownBehavior: ScaleDownBehavior? = nil, securityConfiguration: String? = nil, serviceRole: String? = nil, status: ClusterStatus? = nil, stepConcurrencyLevel: Int? = nil, tags: [Tag]? = nil, terminationProtected: Bool? = nil, unhealthyNodeReplacement: Bool? = nil, visibleToAllUsers: Bool? = nil) {
            self.applications = applications
            self.autoScalingRole = autoScalingRole
            self.autoTerminate = autoTerminate
            self.clusterArn = clusterArn
            self.configurations = configurations
            self.customAmiId = customAmiId
            self.ebsRootVolumeIops = ebsRootVolumeIops
            self.ebsRootVolumeSize = ebsRootVolumeSize
            self.ebsRootVolumeThroughput = ebsRootVolumeThroughput
            self.ec2InstanceAttributes = ec2InstanceAttributes
            self.extendedSupport = extendedSupport
            self.id = id
            self.instanceCollectionType = instanceCollectionType
            self.kerberosAttributes = kerberosAttributes
            self.logEncryptionKmsKeyId = logEncryptionKmsKeyId
            self.logUri = logUri
            self.masterPublicDnsName = masterPublicDnsName
            self.name = name
            self.normalizedInstanceHours = normalizedInstanceHours
            self.osReleaseLabel = osReleaseLabel
            self.outpostArn = outpostArn
            self.placementGroups = placementGroups
            self.releaseLabel = releaseLabel
            self.repoUpgradeOnBoot = repoUpgradeOnBoot
            self.requestedAmiVersion = requestedAmiVersion
            self.runningAmiVersion = runningAmiVersion
            self.scaleDownBehavior = scaleDownBehavior
            self.securityConfiguration = securityConfiguration
            self.serviceRole = serviceRole
            self.status = status
            self.stepConcurrencyLevel = stepConcurrencyLevel
            self.tags = tags
            self.terminationProtected = terminationProtected
            self.unhealthyNodeReplacement = unhealthyNodeReplacement
            self.visibleToAllUsers = visibleToAllUsers
        }

        private enum CodingKeys: String, CodingKey {
            case applications = "Applications"
            case autoScalingRole = "AutoScalingRole"
            case autoTerminate = "AutoTerminate"
            case clusterArn = "ClusterArn"
            case configurations = "Configurations"
            case customAmiId = "CustomAmiId"
            case ebsRootVolumeIops = "EbsRootVolumeIops"
            case ebsRootVolumeSize = "EbsRootVolumeSize"
            case ebsRootVolumeThroughput = "EbsRootVolumeThroughput"
            case ec2InstanceAttributes = "Ec2InstanceAttributes"
            case extendedSupport = "ExtendedSupport"
            case id = "Id"
            case instanceCollectionType = "InstanceCollectionType"
            case kerberosAttributes = "KerberosAttributes"
            case logEncryptionKmsKeyId = "LogEncryptionKmsKeyId"
            case logUri = "LogUri"
            case masterPublicDnsName = "MasterPublicDnsName"
            case name = "Name"
            case normalizedInstanceHours = "NormalizedInstanceHours"
            case osReleaseLabel = "OSReleaseLabel"
            case outpostArn = "OutpostArn"
            case placementGroups = "PlacementGroups"
            case releaseLabel = "ReleaseLabel"
            case repoUpgradeOnBoot = "RepoUpgradeOnBoot"
            case requestedAmiVersion = "RequestedAmiVersion"
            case runningAmiVersion = "RunningAmiVersion"
            case scaleDownBehavior = "ScaleDownBehavior"
            case securityConfiguration = "SecurityConfiguration"
            case serviceRole = "ServiceRole"
            case status = "Status"
            case stepConcurrencyLevel = "StepConcurrencyLevel"
            case tags = "Tags"
            case terminationProtected = "TerminationProtected"
            case unhealthyNodeReplacement = "UnhealthyNodeReplacement"
            case visibleToAllUsers = "VisibleToAllUsers"
        }
    }

    public struct ClusterStateChangeReason: AWSDecodableShape {
        /// The programmatic code for the state change reason.
        public let code: ClusterStateChangeReasonCode?
        /// The descriptive message for the state change reason.
        public let message: String?

        @inlinable
        public init(code: ClusterStateChangeReasonCode? = nil, message: String? = nil) {
            self.code = code
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case code = "Code"
            case message = "Message"
        }
    }

    public struct ClusterStatus: AWSDecodableShape {
        /// A list of tuples that provides information about the errors that caused a cluster to terminate. This structure can contain up to 10 different ErrorDetail tuples.
        public let errorDetails: [ErrorDetail]?
        /// The current state of the cluster.
        public let state: ClusterState?
        /// The reason for the cluster status change.
        public let stateChangeReason: ClusterStateChangeReason?
        /// A timeline that represents the status of a cluster over the lifetime of the cluster.
        public let timeline: ClusterTimeline?

        @inlinable
        public init(errorDetails: [ErrorDetail]? = nil, state: ClusterState? = nil, stateChangeReason: ClusterStateChangeReason? = nil, timeline: ClusterTimeline? = nil) {
            self.errorDetails = errorDetails
            self.state = state
            self.stateChangeReason = stateChangeReason
            self.timeline = timeline
        }

        private enum CodingKeys: String, CodingKey {
            case errorDetails = "ErrorDetails"
            case state = "State"
            case stateChangeReason = "StateChangeReason"
            case timeline = "Timeline"
        }
    }

    public struct ClusterSummary: AWSDecodableShape {
        /// The Amazon Resource Name of the cluster.
        public let clusterArn: String?
        /// The unique identifier for the cluster.
        public let id: String?
        /// The name of the cluster.
        public let name: String?
        /// An approximation of the cost of the cluster, represented in m1.small/hours. This value is incremented one time for every hour an m1.small instance runs. Larger instances are weighted more, so an Amazon EC2 instance that is roughly four times more expensive would result in the normalized instance hours being incremented by four. This result is only an approximation and does not reflect the actual billing rate.
        public let normalizedInstanceHours: Int?
        ///  The Amazon Resource Name (ARN) of the Outpost where the cluster is launched.
        public let outpostArn: String?
        /// The details about the current status of the cluster.
        public let status: ClusterStatus?

        @inlinable
        public init(clusterArn: String? = nil, id: String? = nil, name: String? = nil, normalizedInstanceHours: Int? = nil, outpostArn: String? = nil, status: ClusterStatus? = nil) {
            self.clusterArn = clusterArn
            self.id = id
            self.name = name
            self.normalizedInstanceHours = normalizedInstanceHours
            self.outpostArn = outpostArn
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case clusterArn = "ClusterArn"
            case id = "Id"
            case name = "Name"
            case normalizedInstanceHours = "NormalizedInstanceHours"
            case outpostArn = "OutpostArn"
            case status = "Status"
        }
    }

    public struct ClusterTimeline: AWSDecodableShape {
        /// The creation date and time of the cluster.
        public let creationDateTime: Date?
        /// The date and time when the cluster was terminated.
        public let endDateTime: Date?
        /// The date and time when the cluster was ready to run steps.
        public let readyDateTime: Date?

        @inlinable
        public init(creationDateTime: Date? = nil, endDateTime: Date? = nil, readyDateTime: Date? = nil) {
            self.creationDateTime = creationDateTime
            self.endDateTime = endDateTime
            self.readyDateTime = readyDateTime
        }

        private enum CodingKeys: String, CodingKey {
            case creationDateTime = "CreationDateTime"
            case endDateTime = "EndDateTime"
            case readyDateTime = "ReadyDateTime"
        }
    }

    public struct Command: AWSDecodableShape {
        /// Arguments for Amazon EMR to pass to the command for execution.
        public let args: [String]?
        /// The name of the command.
        public let name: String?
        /// The Amazon S3 location of the command script.
        public let scriptPath: String?

        @inlinable
        public init(args: [String]? = nil, name: String? = nil, scriptPath: String? = nil) {
            self.args = args
            self.name = name
            self.scriptPath = scriptPath
        }

        private enum CodingKeys: String, CodingKey {
            case args = "Args"
            case name = "Name"
            case scriptPath = "ScriptPath"
        }
    }

    public struct ComputeLimits: AWSEncodableShape & AWSDecodableShape {
        ///  The upper boundary of Amazon EC2 units. It is measured through vCPU cores or instances for instance groups and measured through units for instance fleets. Managed scaling activities are not allowed beyond this boundary. The limit only applies to the core and task nodes. The master node cannot be scaled after initial configuration.
        public let maximumCapacityUnits: Int?
        ///  The upper boundary of Amazon EC2 units for core node type in a cluster. It is measured through vCPU cores or instances for instance groups and measured through units for instance fleets. The core units are not allowed to scale beyond this boundary. The parameter is used to split capacity allocation between core and task nodes.
        public let maximumCoreCapacityUnits: Int?
        ///  The upper boundary of On-Demand Amazon EC2 units. It is measured through vCPU cores or instances for instance groups and measured through units for instance fleets. The On-Demand units are not allowed to scale beyond this boundary. The parameter is used to split capacity allocation between On-Demand and Spot Instances.
        public let maximumOnDemandCapacityUnits: Int?
        ///  The lower boundary of Amazon EC2 units. It is measured through vCPU cores or instances for instance groups and measured through units for instance fleets. Managed scaling activities are not allowed beyond this boundary. The limit only applies to the core and task nodes. The master node cannot be scaled after initial configuration.
        public let minimumCapacityUnits: Int?
        ///  The unit type used for specifying a managed scaling policy.
        public let unitType: ComputeLimitsUnitType?

        @inlinable
        public init(maximumCapacityUnits: Int? = nil, maximumCoreCapacityUnits: Int? = nil, maximumOnDemandCapacityUnits: Int? = nil, minimumCapacityUnits: Int? = nil, unitType: ComputeLimitsUnitType? = nil) {
            self.maximumCapacityUnits = maximumCapacityUnits
            self.maximumCoreCapacityUnits = maximumCoreCapacityUnits
            self.maximumOnDemandCapacityUnits = maximumOnDemandCapacityUnits
            self.minimumCapacityUnits = minimumCapacityUnits
            self.unitType = unitType
        }

        private enum CodingKeys: String, CodingKey {
            case maximumCapacityUnits = "MaximumCapacityUnits"
            case maximumCoreCapacityUnits = "MaximumCoreCapacityUnits"
            case maximumOnDemandCapacityUnits = "MaximumOnDemandCapacityUnits"
            case minimumCapacityUnits = "MinimumCapacityUnits"
            case unitType = "UnitType"
        }
    }

    public struct Configuration: AWSEncodableShape & AWSDecodableShape {
        /// The classification within a configuration.
        public let classification: String?
        /// A list of additional configurations to apply within a configuration object.
        public let configurations: [Configuration]?
        /// A set of properties specified within a configuration classification.
        public let properties: [String: String]?

        @inlinable
        public init(classification: String? = nil, configurations: [Configuration]? = nil, properties: [String: String]? = nil) {
            self.classification = classification
            self.configurations = configurations
            self.properties = properties
        }

        private enum CodingKeys: String, CodingKey {
            case classification = "Classification"
            case configurations = "Configurations"
            case properties = "Properties"
        }
    }

    public struct CreatePersistentAppUIInput: AWSEncodableShape {
        /// The EMR containers configuration.
        public let emrContainersConfig: EMRContainersConfig?
        /// The profiler type for the persistent application user interface.
        public let profilerType: ProfilerType?
        /// Tags for the persistent application user interface.
        public let tags: [Tag]?
        /// The unique Amazon Resource Name (ARN) of the target resource.
        public let targetResourceArn: String?
        /// The cross reference for the persistent application user interface.
        public let xReferer: String?

        @inlinable
        public init(emrContainersConfig: EMRContainersConfig? = nil, profilerType: ProfilerType? = nil, tags: [Tag]? = nil, targetResourceArn: String? = nil, xReferer: String? = nil) {
            self.emrContainersConfig = emrContainersConfig
            self.profilerType = profilerType
            self.tags = tags
            self.targetResourceArn = targetResourceArn
            self.xReferer = xReferer
        }

        public func validate(name: String) throws {
            try self.emrContainersConfig?.validate(name: "\(name).emrContainersConfig")
            try self.validate(self.targetResourceArn, name: "targetResourceArn", parent: name, max: 2048)
            try self.validate(self.targetResourceArn, name: "targetResourceArn", parent: name, min: 20)
        }

        private enum CodingKeys: String, CodingKey {
            case emrContainersConfig = "EMRContainersConfig"
            case profilerType = "ProfilerType"
            case tags = "Tags"
            case targetResourceArn = "TargetResourceArn"
            case xReferer = "XReferer"
        }
    }

    public struct CreatePersistentAppUIOutput: AWSDecodableShape {
        /// The persistent application user interface identifier.
        public let persistentAppUIId: String?
        /// Represents if the EMR on EC2 cluster that the persisent application user interface is created for is a runtime role  enabled cluster or not.
        public let runtimeRoleEnabledCluster: Bool?

        @inlinable
        public init(persistentAppUIId: String? = nil, runtimeRoleEnabledCluster: Bool? = nil) {
            self.persistentAppUIId = persistentAppUIId
            self.runtimeRoleEnabledCluster = runtimeRoleEnabledCluster
        }

        private enum CodingKeys: String, CodingKey {
            case persistentAppUIId = "PersistentAppUIId"
            case runtimeRoleEnabledCluster = "RuntimeRoleEnabledCluster"
        }
    }

    public struct CreateSecurityConfigurationInput: AWSEncodableShape {
        /// The name of the security configuration.
        public let name: String?
        /// The security configuration details in JSON format. For JSON parameters and examples, see Use Security Configurations to Set Up Cluster Security in the Amazon EMR Management Guide.
        public let securityConfiguration: String?

        @inlinable
        public init(name: String? = nil, securityConfiguration: String? = nil) {
            self.name = name
            self.securityConfiguration = securityConfiguration
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 10280)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case securityConfiguration = "SecurityConfiguration"
        }
    }

    public struct CreateSecurityConfigurationOutput: AWSDecodableShape {
        /// The date and time the security configuration was created.
        public let creationDateTime: Date?
        /// The name of the security configuration.
        public let name: String?

        @inlinable
        public init(creationDateTime: Date? = nil, name: String? = nil) {
            self.creationDateTime = creationDateTime
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case creationDateTime = "CreationDateTime"
            case name = "Name"
        }
    }

    public struct CreateStudioInput: AWSEncodableShape {
        /// Specifies whether the Studio authenticates users using IAM or IAM Identity Center.
        public let authMode: AuthMode?
        /// The Amazon S3 location to back up Amazon EMR Studio Workspaces and notebook files.
        public let defaultS3Location: String?
        /// A detailed description of the Amazon EMR Studio.
        public let description: String?
        /// The KMS key identifier (ARN) used to encrypt Amazon EMR Studio workspace and notebook files when backed up to Amazon S3.
        public let encryptionKeyArn: String?
        /// The ID of the Amazon EMR Studio Engine security group. The Engine security group allows inbound network traffic from the Workspace security group, and it must be in the same VPC specified by VpcId.
        public let engineSecurityGroupId: String?
        ///  The ARN of the IAM Identity Center instance to create the Studio application.
        public let idcInstanceArn: String?
        ///  Specifies whether IAM Identity Center user assignment is REQUIRED or OPTIONAL. If the value is set to REQUIRED, users must be explicitly assigned to the Studio application to access the Studio.
        public let idcUserAssignment: IdcUserAssignment?
        /// The authentication endpoint of your identity provider (IdP). Specify this value when you use IAM authentication and want to let federated users log in to a Studio with the Studio URL and credentials from your IdP. Amazon EMR Studio redirects users to this endpoint to enter credentials.
        public let idpAuthUrl: String?
        /// The name that your identity provider (IdP) uses for its RelayState parameter. For example, RelayState or TargetSource. Specify this value when you use IAM authentication and want to let federated users log in to a Studio using the Studio URL. The RelayState parameter differs by IdP.
        public let idpRelayStateParameterName: String?
        /// A descriptive name for the Amazon EMR Studio.
        public let name: String?
        /// The IAM role that the Amazon EMR Studio assumes. The service role provides a way for Amazon EMR Studio to interoperate with other Amazon Web Services services.
        public let serviceRole: String?
        /// A list of subnet IDs to associate with the Amazon EMR Studio. A Studio can have a maximum of 5 subnets. The subnets must belong to the VPC specified by VpcId. Studio users can create a Workspace in any of the specified subnets.
        public let subnetIds: [String]?
        /// A list of tags to associate with the Amazon EMR Studio. Tags are user-defined key-value pairs that consist of a required key string with a maximum of 128 characters, and an optional value string with a maximum of 256 characters.
        public let tags: [Tag]?
        ///  A Boolean indicating whether to enable Trusted identity propagation for the Studio. The default value is false.
        public let trustedIdentityPropagationEnabled: Bool?
        /// The IAM user role that users and groups assume when logged in to an Amazon EMR Studio. Only specify a UserRole when you use IAM Identity Center authentication. The permissions attached to the UserRole can be scoped down for each user or group using session policies.
        public let userRole: String?
        /// The ID of the Amazon Virtual Private Cloud (Amazon VPC) to associate with the Studio.
        public let vpcId: String?
        /// The ID of the Amazon EMR Studio Workspace security group. The Workspace security group allows outbound network traffic to resources in the Engine security group, and it must be in the same VPC specified by VpcId.
        public let workspaceSecurityGroupId: String?

        @inlinable
        public init(authMode: AuthMode? = nil, defaultS3Location: String? = nil, description: String? = nil, encryptionKeyArn: String? = nil, engineSecurityGroupId: String? = nil, idcInstanceArn: String? = nil, idcUserAssignment: IdcUserAssignment? = nil, idpAuthUrl: String? = nil, idpRelayStateParameterName: String? = nil, name: String? = nil, serviceRole: String? = nil, subnetIds: [String]? = nil, tags: [Tag]? = nil, trustedIdentityPropagationEnabled: Bool? = nil, userRole: String? = nil, vpcId: String? = nil, workspaceSecurityGroupId: String? = nil) {
            self.authMode = authMode
            self.defaultS3Location = defaultS3Location
            self.description = description
            self.encryptionKeyArn = encryptionKeyArn
            self.engineSecurityGroupId = engineSecurityGroupId
            self.idcInstanceArn = idcInstanceArn
            self.idcUserAssignment = idcUserAssignment
            self.idpAuthUrl = idpAuthUrl
            self.idpRelayStateParameterName = idpRelayStateParameterName
            self.name = name
            self.serviceRole = serviceRole
            self.subnetIds = subnetIds
            self.tags = tags
            self.trustedIdentityPropagationEnabled = trustedIdentityPropagationEnabled
            self.userRole = userRole
            self.vpcId = vpcId
            self.workspaceSecurityGroupId = workspaceSecurityGroupId
        }

        public func validate(name: String) throws {
            try self.validate(self.defaultS3Location, name: "defaultS3Location", parent: name, max: 10280)
            try self.validate(self.defaultS3Location, name: "defaultS3Location", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.description, name: "description", parent: name, max: 256)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.encryptionKeyArn, name: "encryptionKeyArn", parent: name, max: 10280)
            try self.validate(self.encryptionKeyArn, name: "encryptionKeyArn", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.engineSecurityGroupId, name: "engineSecurityGroupId", parent: name, max: 256)
            try self.validate(self.engineSecurityGroupId, name: "engineSecurityGroupId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.idcInstanceArn, name: "idcInstanceArn", parent: name, max: 2048)
            try self.validate(self.idcInstanceArn, name: "idcInstanceArn", parent: name, min: 20)
            try self.validate(self.idpAuthUrl, name: "idpAuthUrl", parent: name, max: 10280)
            try self.validate(self.idpAuthUrl, name: "idpAuthUrl", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.idpRelayStateParameterName, name: "idpRelayStateParameterName", parent: name, max: 256)
            try self.validate(self.idpRelayStateParameterName, name: "idpRelayStateParameterName", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.serviceRole, name: "serviceRole", parent: name, max: 10280)
            try self.validate(self.serviceRole, name: "serviceRole", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.userRole, name: "userRole", parent: name, max: 10280)
            try self.validate(self.userRole, name: "userRole", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.vpcId, name: "vpcId", parent: name, max: 256)
            try self.validate(self.vpcId, name: "vpcId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.workspaceSecurityGroupId, name: "workspaceSecurityGroupId", parent: name, max: 256)
            try self.validate(self.workspaceSecurityGroupId, name: "workspaceSecurityGroupId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case authMode = "AuthMode"
            case defaultS3Location = "DefaultS3Location"
            case description = "Description"
            case encryptionKeyArn = "EncryptionKeyArn"
            case engineSecurityGroupId = "EngineSecurityGroupId"
            case idcInstanceArn = "IdcInstanceArn"
            case idcUserAssignment = "IdcUserAssignment"
            case idpAuthUrl = "IdpAuthUrl"
            case idpRelayStateParameterName = "IdpRelayStateParameterName"
            case name = "Name"
            case serviceRole = "ServiceRole"
            case subnetIds = "SubnetIds"
            case tags = "Tags"
            case trustedIdentityPropagationEnabled = "TrustedIdentityPropagationEnabled"
            case userRole = "UserRole"
            case vpcId = "VpcId"
            case workspaceSecurityGroupId = "WorkspaceSecurityGroupId"
        }
    }

    public struct CreateStudioOutput: AWSDecodableShape {
        /// The ID of the Amazon EMR Studio.
        public let studioId: String?
        /// The unique Studio access URL.
        public let url: String?

        @inlinable
        public init(studioId: String? = nil, url: String? = nil) {
            self.studioId = studioId
            self.url = url
        }

        private enum CodingKeys: String, CodingKey {
            case studioId = "StudioId"
            case url = "Url"
        }
    }

    public struct CreateStudioSessionMappingInput: AWSEncodableShape {
        /// The globally unique identifier (GUID) of the user or group from the IAM Identity Center Identity Store. For more information, see UserId and GroupId in the IAM Identity Center Identity Store API Reference. Either IdentityName or IdentityId must be specified, but not both.
        public let identityId: String?
        /// The name of the user or group. For more information, see UserName and DisplayName in the IAM Identity Center Identity Store API Reference. Either IdentityName or IdentityId must be specified, but not both.
        public let identityName: String?
        /// Specifies whether the identity to map to the Amazon EMR Studio is a user or a group.
        public let identityType: IdentityType?
        /// The Amazon Resource Name (ARN) for the session policy that will be applied to the user or group. You should specify the ARN for the session policy that you want to apply, not the ARN of your user role. For more information, see Create an Amazon EMR Studio User Role with Session Policies.
        public let sessionPolicyArn: String?
        /// The ID of the Amazon EMR Studio to which the user or group will be mapped.
        public let studioId: String?

        @inlinable
        public init(identityId: String? = nil, identityName: String? = nil, identityType: IdentityType? = nil, sessionPolicyArn: String? = nil, studioId: String? = nil) {
            self.identityId = identityId
            self.identityName = identityName
            self.identityType = identityType
            self.sessionPolicyArn = sessionPolicyArn
            self.studioId = studioId
        }

        public func validate(name: String) throws {
            try self.validate(self.identityId, name: "identityId", parent: name, max: 256)
            try self.validate(self.identityId, name: "identityId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.identityName, name: "identityName", parent: name, max: 256)
            try self.validate(self.identityName, name: "identityName", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.sessionPolicyArn, name: "sessionPolicyArn", parent: name, max: 256)
            try self.validate(self.sessionPolicyArn, name: "sessionPolicyArn", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.studioId, name: "studioId", parent: name, max: 256)
            try self.validate(self.studioId, name: "studioId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case identityId = "IdentityId"
            case identityName = "IdentityName"
            case identityType = "IdentityType"
            case sessionPolicyArn = "SessionPolicyArn"
            case studioId = "StudioId"
        }
    }

    public struct DeleteSecurityConfigurationInput: AWSEncodableShape {
        /// The name of the security configuration.
        public let name: String?

        @inlinable
        public init(name: String? = nil) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 10280)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
        }
    }

    public struct DeleteSecurityConfigurationOutput: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteStudioInput: AWSEncodableShape {
        /// The ID of the Amazon EMR Studio.
        public let studioId: String?

        @inlinable
        public init(studioId: String? = nil) {
            self.studioId = studioId
        }

        public func validate(name: String) throws {
            try self.validate(self.studioId, name: "studioId", parent: name, max: 256)
            try self.validate(self.studioId, name: "studioId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case studioId = "StudioId"
        }
    }

    public struct DeleteStudioSessionMappingInput: AWSEncodableShape {
        /// The globally unique identifier (GUID) of the user or group to remove from the Amazon EMR Studio. For more information, see UserId and GroupId in the IAM Identity Center Identity Store API Reference. Either IdentityName or IdentityId must be specified.
        public let identityId: String?
        /// The name of the user name or group to remove from the Amazon EMR Studio. For more information, see UserName and DisplayName in the IAM Identity Center Store API Reference. Either IdentityName or IdentityId must be specified.
        public let identityName: String?
        /// Specifies whether the identity to delete from the Amazon EMR Studio is a user or a group.
        public let identityType: IdentityType?
        /// The ID of the Amazon EMR Studio.
        public let studioId: String?

        @inlinable
        public init(identityId: String? = nil, identityName: String? = nil, identityType: IdentityType? = nil, studioId: String? = nil) {
            self.identityId = identityId
            self.identityName = identityName
            self.identityType = identityType
            self.studioId = studioId
        }

        public func validate(name: String) throws {
            try self.validate(self.identityId, name: "identityId", parent: name, max: 256)
            try self.validate(self.identityId, name: "identityId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.identityName, name: "identityName", parent: name, max: 256)
            try self.validate(self.identityName, name: "identityName", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.studioId, name: "studioId", parent: name, max: 256)
            try self.validate(self.studioId, name: "studioId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case identityId = "IdentityId"
            case identityName = "IdentityName"
            case identityType = "IdentityType"
            case studioId = "StudioId"
        }
    }

    public struct DescribeClusterInput: AWSEncodableShape {
        /// The identifier of the cluster to describe.
        public let clusterId: String?

        @inlinable
        public init(clusterId: String? = nil) {
            self.clusterId = clusterId
        }

        private enum CodingKeys: String, CodingKey {
            case clusterId = "ClusterId"
        }
    }

    public struct DescribeClusterOutput: AWSDecodableShape {
        /// This output contains the details for the requested cluster.
        public let cluster: Cluster?

        @inlinable
        public init(cluster: Cluster? = nil) {
            self.cluster = cluster
        }

        private enum CodingKeys: String, CodingKey {
            case cluster = "Cluster"
        }
    }

    public struct DescribeJobFlowsInput: AWSEncodableShape {
        /// Return only job flows created after this date and time.
        public let createdAfter: Date?
        /// Return only job flows created before this date and time.
        public let createdBefore: Date?
        /// Return only job flows whose job flow ID is contained in this list.
        public let jobFlowIds: [String]?
        /// Return only job flows whose state is contained in this list.
        public let jobFlowStates: [JobFlowExecutionState]?

        @inlinable
        public init(createdAfter: Date? = nil, createdBefore: Date? = nil, jobFlowIds: [String]? = nil, jobFlowStates: [JobFlowExecutionState]? = nil) {
            self.createdAfter = createdAfter
            self.createdBefore = createdBefore
            self.jobFlowIds = jobFlowIds
            self.jobFlowStates = jobFlowStates
        }

        public func validate(name: String) throws {
            try self.jobFlowIds?.forEach {
                try validate($0, name: "jobFlowIds[]", parent: name, max: 10280)
                try validate($0, name: "jobFlowIds[]", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case createdAfter = "CreatedAfter"
            case createdBefore = "CreatedBefore"
            case jobFlowIds = "JobFlowIds"
            case jobFlowStates = "JobFlowStates"
        }
    }

    public struct DescribeJobFlowsOutput: AWSDecodableShape {
        /// A list of job flows matching the parameters supplied.
        public let jobFlows: [JobFlowDetail]?

        @inlinable
        public init(jobFlows: [JobFlowDetail]? = nil) {
            self.jobFlows = jobFlows
        }

        private enum CodingKeys: String, CodingKey {
            case jobFlows = "JobFlows"
        }
    }

    public struct DescribeNotebookExecutionInput: AWSEncodableShape {
        /// The unique identifier of the notebook execution.
        public let notebookExecutionId: String?

        @inlinable
        public init(notebookExecutionId: String? = nil) {
            self.notebookExecutionId = notebookExecutionId
        }

        public func validate(name: String) throws {
            try self.validate(self.notebookExecutionId, name: "notebookExecutionId", parent: name, max: 256)
            try self.validate(self.notebookExecutionId, name: "notebookExecutionId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case notebookExecutionId = "NotebookExecutionId"
        }
    }

    public struct DescribeNotebookExecutionOutput: AWSDecodableShape {
        /// Properties of the notebook execution.
        public let notebookExecution: NotebookExecution?

        @inlinable
        public init(notebookExecution: NotebookExecution? = nil) {
            self.notebookExecution = notebookExecution
        }

        private enum CodingKeys: String, CodingKey {
            case notebookExecution = "NotebookExecution"
        }
    }

    public struct DescribePersistentAppUIInput: AWSEncodableShape {
        /// The identifier for the persistent application user interface.
        public let persistentAppUIId: String?

        @inlinable
        public init(persistentAppUIId: String? = nil) {
            self.persistentAppUIId = persistentAppUIId
        }

        public func validate(name: String) throws {
            try self.validate(self.persistentAppUIId, name: "persistentAppUIId", parent: name, max: 256)
            try self.validate(self.persistentAppUIId, name: "persistentAppUIId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case persistentAppUIId = "PersistentAppUIId"
        }
    }

    public struct DescribePersistentAppUIOutput: AWSDecodableShape {
        /// The persistent application user interface.
        public let persistentAppUI: PersistentAppUI?

        @inlinable
        public init(persistentAppUI: PersistentAppUI? = nil) {
            self.persistentAppUI = persistentAppUI
        }

        private enum CodingKeys: String, CodingKey {
            case persistentAppUI = "PersistentAppUI"
        }
    }

    public struct DescribeReleaseLabelInput: AWSEncodableShape {
        /// Reserved for future use. Currently set to null.
        public let maxResults: Int?
        /// The pagination token. Reserved for future use. Currently set to null.
        public let nextToken: String?
        /// The target release label to be described.
        public let releaseLabel: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, releaseLabel: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.releaseLabel = releaseLabel
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case releaseLabel = "ReleaseLabel"
        }
    }

    public struct DescribeReleaseLabelOutput: AWSDecodableShape {
        /// The list of applications available for the target release label. Name is the name of the application. Version is the concise version of the application.
        public let applications: [SimplifiedApplication]?
        /// The list of available Amazon Linux release versions for an Amazon EMR release. Contains a Label field that is formatted as shown in  Amazon Linux 2 Release Notes . For example, 2.0.20220218.1.
        public let availableOSReleases: [OSRelease]?
        /// The pagination token. Reserved for future use. Currently set to null.
        public let nextToken: String?
        /// The target release label described in the response.
        public let releaseLabel: String?

        @inlinable
        public init(applications: [SimplifiedApplication]? = nil, availableOSReleases: [OSRelease]? = nil, nextToken: String? = nil, releaseLabel: String? = nil) {
            self.applications = applications
            self.availableOSReleases = availableOSReleases
            self.nextToken = nextToken
            self.releaseLabel = releaseLabel
        }

        private enum CodingKeys: String, CodingKey {
            case applications = "Applications"
            case availableOSReleases = "AvailableOSReleases"
            case nextToken = "NextToken"
            case releaseLabel = "ReleaseLabel"
        }
    }

    public struct DescribeSecurityConfigurationInput: AWSEncodableShape {
        /// The name of the security configuration.
        public let name: String?

        @inlinable
        public init(name: String? = nil) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 10280)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
        }
    }

    public struct DescribeSecurityConfigurationOutput: AWSDecodableShape {
        /// The date and time the security configuration was created
        public let creationDateTime: Date?
        /// The name of the security configuration.
        public let name: String?
        /// The security configuration details in JSON format.
        public let securityConfiguration: String?

        @inlinable
        public init(creationDateTime: Date? = nil, name: String? = nil, securityConfiguration: String? = nil) {
            self.creationDateTime = creationDateTime
            self.name = name
            self.securityConfiguration = securityConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case creationDateTime = "CreationDateTime"
            case name = "Name"
            case securityConfiguration = "SecurityConfiguration"
        }
    }

    public struct DescribeStepInput: AWSEncodableShape {
        /// The identifier of the cluster with steps to describe.
        public let clusterId: String?
        /// The identifier of the step to describe.
        public let stepId: String?

        @inlinable
        public init(clusterId: String? = nil, stepId: String? = nil) {
            self.clusterId = clusterId
            self.stepId = stepId
        }

        private enum CodingKeys: String, CodingKey {
            case clusterId = "ClusterId"
            case stepId = "StepId"
        }
    }

    public struct DescribeStepOutput: AWSDecodableShape {
        /// The step details for the requested step identifier.
        public let step: Step?

        @inlinable
        public init(step: Step? = nil) {
            self.step = step
        }

        private enum CodingKeys: String, CodingKey {
            case step = "Step"
        }
    }

    public struct DescribeStudioInput: AWSEncodableShape {
        /// The Amazon EMR Studio ID.
        public let studioId: String?

        @inlinable
        public init(studioId: String? = nil) {
            self.studioId = studioId
        }

        public func validate(name: String) throws {
            try self.validate(self.studioId, name: "studioId", parent: name, max: 256)
            try self.validate(self.studioId, name: "studioId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case studioId = "StudioId"
        }
    }

    public struct DescribeStudioOutput: AWSDecodableShape {
        /// The Amazon EMR Studio details.
        public let studio: Studio?

        @inlinable
        public init(studio: Studio? = nil) {
            self.studio = studio
        }

        private enum CodingKeys: String, CodingKey {
            case studio = "Studio"
        }
    }

    public struct EMRContainersConfig: AWSEncodableShape {
        /// The Job run ID for the container configuration.
        public let jobRunId: String?

        @inlinable
        public init(jobRunId: String? = nil) {
            self.jobRunId = jobRunId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobRunId, name: "jobRunId", parent: name, max: 256)
            try self.validate(self.jobRunId, name: "jobRunId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobRunId = "JobRunId"
        }
    }

    public struct EbsBlockDevice: AWSDecodableShape {
        /// The device name that is exposed to the instance, such as /dev/sdh.
        public let device: String?
        /// EBS volume specifications such as volume type, IOPS, size (GiB) and throughput (MiB/s) that are requested for the EBS volume attached to an Amazon EC2 instance in the cluster.
        public let volumeSpecification: VolumeSpecification?

        @inlinable
        public init(device: String? = nil, volumeSpecification: VolumeSpecification? = nil) {
            self.device = device
            self.volumeSpecification = volumeSpecification
        }

        private enum CodingKeys: String, CodingKey {
            case device = "Device"
            case volumeSpecification = "VolumeSpecification"
        }
    }

    public struct EbsBlockDeviceConfig: AWSEncodableShape {
        /// EBS volume specifications such as volume type, IOPS, size (GiB) and throughput (MiB/s) that are requested for the EBS volume attached to an Amazon EC2 instance in the cluster.
        public let volumeSpecification: VolumeSpecification?
        /// Number of EBS volumes with a specific volume configuration that are associated with every instance in the instance group
        public let volumesPerInstance: Int?

        @inlinable
        public init(volumeSpecification: VolumeSpecification? = nil, volumesPerInstance: Int? = nil) {
            self.volumeSpecification = volumeSpecification
            self.volumesPerInstance = volumesPerInstance
        }

        public func validate(name: String) throws {
            try self.volumeSpecification?.validate(name: "\(name).volumeSpecification")
        }

        private enum CodingKeys: String, CodingKey {
            case volumeSpecification = "VolumeSpecification"
            case volumesPerInstance = "VolumesPerInstance"
        }
    }

    public struct EbsConfiguration: AWSEncodableShape {
        /// An array of Amazon EBS volume specifications attached to a cluster instance.
        public let ebsBlockDeviceConfigs: [EbsBlockDeviceConfig]?
        /// Indicates whether an Amazon EBS volume is EBS-optimized. The default is false. You should explicitly set this value to true to enable the Amazon EBS-optimized setting  for an EC2 instance.
        public let ebsOptimized: Bool?

        @inlinable
        public init(ebsBlockDeviceConfigs: [EbsBlockDeviceConfig]? = nil, ebsOptimized: Bool? = nil) {
            self.ebsBlockDeviceConfigs = ebsBlockDeviceConfigs
            self.ebsOptimized = ebsOptimized
        }

        public func validate(name: String) throws {
            try self.ebsBlockDeviceConfigs?.forEach {
                try $0.validate(name: "\(name).ebsBlockDeviceConfigs[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case ebsBlockDeviceConfigs = "EbsBlockDeviceConfigs"
            case ebsOptimized = "EbsOptimized"
        }
    }

    public struct EbsVolume: AWSDecodableShape {
        /// The device name that is exposed to the instance, such as /dev/sdh.
        public let device: String?
        /// The volume identifier of the EBS volume.
        public let volumeId: String?

        @inlinable
        public init(device: String? = nil, volumeId: String? = nil) {
            self.device = device
            self.volumeId = volumeId
        }

        private enum CodingKeys: String, CodingKey {
            case device = "Device"
            case volumeId = "VolumeId"
        }
    }

    public struct Ec2InstanceAttributes: AWSDecodableShape {
        /// A list of additional Amazon EC2 security group IDs for the master node.
        public let additionalMasterSecurityGroups: [String]?
        /// A list of additional Amazon EC2 security group IDs for the core and task nodes.
        public let additionalSlaveSecurityGroups: [String]?
        /// The Availability Zone in which the cluster will run.
        public let ec2AvailabilityZone: String?
        /// The name of the Amazon EC2 key pair to use when connecting with SSH into the master node as a user named "hadoop".
        public let ec2KeyName: String?
        /// Set this parameter to the identifier of the Amazon VPC subnet where you want the cluster to launch. If you do not specify this value, and your account supports EC2-Classic, the cluster launches in EC2-Classic.
        public let ec2SubnetId: String?
        /// The identifier of the Amazon EC2 security group for the master node.
        public let emrManagedMasterSecurityGroup: String?
        /// The identifier of the Amazon EC2 security group for the core and task nodes.
        public let emrManagedSlaveSecurityGroup: String?
        /// The IAM role that was specified when the cluster was launched. The Amazon EC2 instances of the cluster assume this role.
        public let iamInstanceProfile: String?
        /// Applies to clusters configured with the instance fleets option. Specifies one or more Availability Zones in which to launch Amazon EC2 cluster instances when the EC2-Classic network configuration is supported. Amazon EMR chooses the Availability Zone with the best fit from among the list of RequestedEc2AvailabilityZones, and then launches all cluster instances within that Availability Zone. If you do not specify this value, Amazon EMR chooses the Availability Zone for you. RequestedEc2SubnetIDs and RequestedEc2AvailabilityZones cannot be specified together.
        public let requestedEc2AvailabilityZones: [String]?
        /// Applies to clusters configured with the instance fleets option. Specifies the unique identifier of one or more Amazon EC2 subnets in which to launch Amazon EC2 cluster instances. Subnets must exist within the same VPC. Amazon EMR chooses the Amazon EC2 subnet with the best fit from among the list of RequestedEc2SubnetIds, and then launches all cluster instances within that Subnet. If this value is not specified, and the account and Region support EC2-Classic networks, the cluster launches instances in the EC2-Classic network and uses RequestedEc2AvailabilityZones instead of this setting. If EC2-Classic is not supported, and no Subnet is specified, Amazon EMR chooses the subnet for you. RequestedEc2SubnetIDs and RequestedEc2AvailabilityZones cannot be specified together.
        public let requestedEc2SubnetIds: [String]?
        /// The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.
        public let serviceAccessSecurityGroup: String?

        @inlinable
        public init(additionalMasterSecurityGroups: [String]? = nil, additionalSlaveSecurityGroups: [String]? = nil, ec2AvailabilityZone: String? = nil, ec2KeyName: String? = nil, ec2SubnetId: String? = nil, emrManagedMasterSecurityGroup: String? = nil, emrManagedSlaveSecurityGroup: String? = nil, iamInstanceProfile: String? = nil, requestedEc2AvailabilityZones: [String]? = nil, requestedEc2SubnetIds: [String]? = nil, serviceAccessSecurityGroup: String? = nil) {
            self.additionalMasterSecurityGroups = additionalMasterSecurityGroups
            self.additionalSlaveSecurityGroups = additionalSlaveSecurityGroups
            self.ec2AvailabilityZone = ec2AvailabilityZone
            self.ec2KeyName = ec2KeyName
            self.ec2SubnetId = ec2SubnetId
            self.emrManagedMasterSecurityGroup = emrManagedMasterSecurityGroup
            self.emrManagedSlaveSecurityGroup = emrManagedSlaveSecurityGroup
            self.iamInstanceProfile = iamInstanceProfile
            self.requestedEc2AvailabilityZones = requestedEc2AvailabilityZones
            self.requestedEc2SubnetIds = requestedEc2SubnetIds
            self.serviceAccessSecurityGroup = serviceAccessSecurityGroup
        }

        private enum CodingKeys: String, CodingKey {
            case additionalMasterSecurityGroups = "AdditionalMasterSecurityGroups"
            case additionalSlaveSecurityGroups = "AdditionalSlaveSecurityGroups"
            case ec2AvailabilityZone = "Ec2AvailabilityZone"
            case ec2KeyName = "Ec2KeyName"
            case ec2SubnetId = "Ec2SubnetId"
            case emrManagedMasterSecurityGroup = "EmrManagedMasterSecurityGroup"
            case emrManagedSlaveSecurityGroup = "EmrManagedSlaveSecurityGroup"
            case iamInstanceProfile = "IamInstanceProfile"
            case requestedEc2AvailabilityZones = "RequestedEc2AvailabilityZones"
            case requestedEc2SubnetIds = "RequestedEc2SubnetIds"
            case serviceAccessSecurityGroup = "ServiceAccessSecurityGroup"
        }
    }

    public struct ErrorDetail: AWSDecodableShape {
        /// The name or code associated with the error.
        public let errorCode: String?
        /// A list of key value pairs that provides contextual information about why an error occured.
        public let errorData: [[String: String]]?
        /// A message that describes the error.
        public let errorMessage: String?

        @inlinable
        public init(errorCode: String? = nil, errorData: [[String: String]]? = nil, errorMessage: String? = nil) {
            self.errorCode = errorCode
            self.errorData = errorData
            self.errorMessage = errorMessage
        }

        private enum CodingKeys: String, CodingKey {
            case errorCode = "ErrorCode"
            case errorData = "ErrorData"
            case errorMessage = "ErrorMessage"
        }
    }

    public struct ExecutionEngineConfig: AWSEncodableShape & AWSDecodableShape {
        /// The execution role ARN required for the notebook execution.
        public let executionRoleArn: String?
        /// The unique identifier of the execution engine. For an Amazon EMR cluster, this is the cluster ID.
        public let id: String?
        /// An optional unique ID of an Amazon EC2 security group to associate with the master instance of the Amazon EMR cluster for this notebook execution. For more information see Specifying Amazon EC2 Security Groups for Amazon EMR Notebooks in the EMR Management Guide.
        public let masterInstanceSecurityGroupId: String?
        /// The type of execution engine. A value of EMR specifies an Amazon EMR cluster.
        public let type: ExecutionEngineType?

        @inlinable
        public init(executionRoleArn: String? = nil, id: String? = nil, masterInstanceSecurityGroupId: String? = nil, type: ExecutionEngineType? = nil) {
            self.executionRoleArn = executionRoleArn
            self.id = id
            self.masterInstanceSecurityGroupId = masterInstanceSecurityGroupId
            self.type = type
        }

        public func validate(name: String) throws {
            try self.validate(self.executionRoleArn, name: "executionRoleArn", parent: name, max: 2048)
            try self.validate(self.executionRoleArn, name: "executionRoleArn", parent: name, min: 20)
            try self.validate(self.executionRoleArn, name: "executionRoleArn", parent: name, pattern: "^arn:(aws[a-zA-Z0-9-]*):iam::(\\d{12})?:(role((\\u002F)|(\\u002F[\\u0021-\\u007F]+\\u002F))[\\w+=,.@-]+)$")
            try self.validate(self.id, name: "id", parent: name, max: 256)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.masterInstanceSecurityGroupId, name: "masterInstanceSecurityGroupId", parent: name, max: 256)
            try self.validate(self.masterInstanceSecurityGroupId, name: "masterInstanceSecurityGroupId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case executionRoleArn = "ExecutionRoleArn"
            case id = "Id"
            case masterInstanceSecurityGroupId = "MasterInstanceSecurityGroupId"
            case type = "Type"
        }
    }

    public struct FailureDetails: AWSDecodableShape {
        /// The path to the log file where the step failure root cause was originally recorded.
        public let logFile: String?
        /// The descriptive message including the error the Amazon EMR service has identified as the cause of step failure. This is text from an error log that describes the root cause of the failure.
        public let message: String?
        /// The reason for the step failure. In the case where the service cannot successfully determine the root cause of the failure, it returns "Unknown Error" as a reason.
        public let reason: String?

        @inlinable
        public init(logFile: String? = nil, message: String? = nil, reason: String? = nil) {
            self.logFile = logFile
            self.message = message
            self.reason = reason
        }

        private enum CodingKeys: String, CodingKey {
            case logFile = "LogFile"
            case message = "Message"
            case reason = "Reason"
        }
    }

    public struct GetAutoTerminationPolicyInput: AWSEncodableShape {
        /// Specifies the ID of the Amazon EMR cluster for which the auto-termination policy will be fetched.
        public let clusterId: String?

        @inlinable
        public init(clusterId: String? = nil) {
            self.clusterId = clusterId
        }

        private enum CodingKeys: String, CodingKey {
            case clusterId = "ClusterId"
        }
    }

    public struct GetAutoTerminationPolicyOutput: AWSDecodableShape {
        /// Specifies the auto-termination policy that is attached to an Amazon EMR cluster.
        public let autoTerminationPolicy: AutoTerminationPolicy?

        @inlinable
        public init(autoTerminationPolicy: AutoTerminationPolicy? = nil) {
            self.autoTerminationPolicy = autoTerminationPolicy
        }

        private enum CodingKeys: String, CodingKey {
            case autoTerminationPolicy = "AutoTerminationPolicy"
        }
    }

    public struct GetBlockPublicAccessConfigurationInput: AWSEncodableShape {
        public init() {}
    }

    public struct GetBlockPublicAccessConfigurationOutput: AWSDecodableShape {
        /// A configuration for Amazon EMR block public access. The configuration applies to all clusters created in your account for the current Region. The configuration specifies whether block public access is enabled. If block public access is enabled, security groups associated with the cluster cannot have rules that allow inbound traffic from 0.0.0.0/0 or ::/0 on a port, unless the port is specified as an exception using PermittedPublicSecurityGroupRuleRanges in the BlockPublicAccessConfiguration. By default, Port 22 (SSH) is an exception, and public access is allowed on this port. You can change this by updating the block public access configuration to remove the exception.  For accounts that created clusters in a Region before November 25, 2019, block public access is disabled by default in that Region. To use this feature, you must manually enable and configure it. For accounts that did not create an Amazon EMR cluster in a Region before this date, block public access is enabled by default in that Region.
        public let blockPublicAccessConfiguration: BlockPublicAccessConfiguration?
        /// Properties that describe the Amazon Web Services principal that created the BlockPublicAccessConfiguration using the PutBlockPublicAccessConfiguration action as well as the date and time that the configuration was created. Each time a configuration for block public access is updated, Amazon EMR updates this metadata.
        public let blockPublicAccessConfigurationMetadata: BlockPublicAccessConfigurationMetadata?

        @inlinable
        public init(blockPublicAccessConfiguration: BlockPublicAccessConfiguration? = nil, blockPublicAccessConfigurationMetadata: BlockPublicAccessConfigurationMetadata? = nil) {
            self.blockPublicAccessConfiguration = blockPublicAccessConfiguration
            self.blockPublicAccessConfigurationMetadata = blockPublicAccessConfigurationMetadata
        }

        private enum CodingKeys: String, CodingKey {
            case blockPublicAccessConfiguration = "BlockPublicAccessConfiguration"
            case blockPublicAccessConfigurationMetadata = "BlockPublicAccessConfigurationMetadata"
        }
    }

    public struct GetClusterSessionCredentialsInput: AWSEncodableShape {
        /// The unique identifier of the cluster.
        public let clusterId: String?
        /// The Amazon Resource Name (ARN) of the runtime role for interactive workload submission on the cluster. The runtime role can be a cross-account IAM role. The runtime role ARN is a combination of account ID, role name, and role type using the following format: arn:partition:service:region:account:resource.
        public let executionRoleArn: String?

        @inlinable
        public init(clusterId: String? = nil, executionRoleArn: String? = nil) {
            self.clusterId = clusterId
            self.executionRoleArn = executionRoleArn
        }

        public func validate(name: String) throws {
            try self.validate(self.clusterId, name: "clusterId", parent: name, max: 256)
            try self.validate(self.clusterId, name: "clusterId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.executionRoleArn, name: "executionRoleArn", parent: name, max: 2048)
            try self.validate(self.executionRoleArn, name: "executionRoleArn", parent: name, min: 20)
        }

        private enum CodingKeys: String, CodingKey {
            case clusterId = "ClusterId"
            case executionRoleArn = "ExecutionRoleArn"
        }
    }

    public struct GetClusterSessionCredentialsOutput: AWSDecodableShape {
        /// The credentials that you can use to connect to cluster endpoints that support username and password authentication.
        public let credentials: Credentials?
        /// The time when the credentials that are returned by the GetClusterSessionCredentials API expire.
        public let expiresAt: Date?

        @inlinable
        public init(credentials: Credentials? = nil, expiresAt: Date? = nil) {
            self.credentials = credentials
            self.expiresAt = expiresAt
        }

        private enum CodingKeys: String, CodingKey {
            case credentials = "Credentials"
            case expiresAt = "ExpiresAt"
        }
    }

    public struct GetManagedScalingPolicyInput: AWSEncodableShape {
        /// Specifies the ID of the cluster for which the managed scaling policy will be fetched.
        public let clusterId: String?

        @inlinable
        public init(clusterId: String? = nil) {
            self.clusterId = clusterId
        }

        private enum CodingKeys: String, CodingKey {
            case clusterId = "ClusterId"
        }
    }

    public struct GetManagedScalingPolicyOutput: AWSDecodableShape {
        /// Specifies the managed scaling policy that is attached to an Amazon EMR cluster.
        public let managedScalingPolicy: ManagedScalingPolicy?

        @inlinable
        public init(managedScalingPolicy: ManagedScalingPolicy? = nil) {
            self.managedScalingPolicy = managedScalingPolicy
        }

        private enum CodingKeys: String, CodingKey {
            case managedScalingPolicy = "ManagedScalingPolicy"
        }
    }

    public struct GetOnClusterAppUIPresignedURLInput: AWSEncodableShape {
        /// The application ID associated with the cluster's application user interface presigned URL.
        public let applicationId: String?
        /// The cluster ID associated with the cluster's application user interface presigned URL.
        public let clusterId: String?
        /// Determines if the user interface presigned URL is for a dry run.
        public let dryRun: Bool?
        /// The execution role ARN associated with the cluster's application user interface  presigned URL.
        public let executionRoleArn: String?
        /// The application UI type associated with the cluster's application user interface presigned URL.
        public let onClusterAppUIType: OnClusterAppUIType?

        @inlinable
        public init(applicationId: String? = nil, clusterId: String? = nil, dryRun: Bool? = nil, executionRoleArn: String? = nil, onClusterAppUIType: OnClusterAppUIType? = nil) {
            self.applicationId = applicationId
            self.clusterId = clusterId
            self.dryRun = dryRun
            self.executionRoleArn = executionRoleArn
            self.onClusterAppUIType = onClusterAppUIType
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationId, name: "applicationId", parent: name, max: 256)
            try self.validate(self.applicationId, name: "applicationId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.clusterId, name: "clusterId", parent: name, max: 256)
            try self.validate(self.clusterId, name: "clusterId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.executionRoleArn, name: "executionRoleArn", parent: name, max: 2048)
            try self.validate(self.executionRoleArn, name: "executionRoleArn", parent: name, min: 20)
        }

        private enum CodingKeys: String, CodingKey {
            case applicationId = "ApplicationId"
            case clusterId = "ClusterId"
            case dryRun = "DryRun"
            case executionRoleArn = "ExecutionRoleArn"
            case onClusterAppUIType = "OnClusterAppUIType"
        }
    }

    public struct GetOnClusterAppUIPresignedURLOutput: AWSDecodableShape {
        /// The cluster's generated presigned URL.
        public let presignedURL: String?
        /// Used to determine if the presigned URL is ready.
        public let presignedURLReady: Bool?

        @inlinable
        public init(presignedURL: String? = nil, presignedURLReady: Bool? = nil) {
            self.presignedURL = presignedURL
            self.presignedURLReady = presignedURLReady
        }

        private enum CodingKeys: String, CodingKey {
            case presignedURL = "PresignedURL"
            case presignedURLReady = "PresignedURLReady"
        }
    }

    public struct GetPersistentAppUIPresignedURLInput: AWSEncodableShape {
        /// The application ID associated with the presigned URL.
        public let applicationId: String?
        /// A boolean that represents if the caller is an authentication proxy call.
        public let authProxyCall: Bool?
        /// The execution role ARN associated with the presigned URL.
        public let executionRoleArn: String?
        /// The persistent application user interface ID associated with the presigned URL.
        public let persistentAppUIId: String?
        /// The persistent application user interface type associated with the presigned URL.
        public let persistentAppUIType: PersistentAppUIType?

        @inlinable
        public init(applicationId: String? = nil, authProxyCall: Bool? = nil, executionRoleArn: String? = nil, persistentAppUIId: String? = nil, persistentAppUIType: PersistentAppUIType? = nil) {
            self.applicationId = applicationId
            self.authProxyCall = authProxyCall
            self.executionRoleArn = executionRoleArn
            self.persistentAppUIId = persistentAppUIId
            self.persistentAppUIType = persistentAppUIType
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationId, name: "applicationId", parent: name, max: 256)
            try self.validate(self.applicationId, name: "applicationId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.executionRoleArn, name: "executionRoleArn", parent: name, max: 2048)
            try self.validate(self.executionRoleArn, name: "executionRoleArn", parent: name, min: 20)
            try self.validate(self.persistentAppUIId, name: "persistentAppUIId", parent: name, max: 256)
            try self.validate(self.persistentAppUIId, name: "persistentAppUIId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case applicationId = "ApplicationId"
            case authProxyCall = "AuthProxyCall"
            case executionRoleArn = "ExecutionRoleArn"
            case persistentAppUIId = "PersistentAppUIId"
            case persistentAppUIType = "PersistentAppUIType"
        }
    }

    public struct GetPersistentAppUIPresignedURLOutput: AWSDecodableShape {
        /// The returned presigned URL.
        public let presignedURL: String?
        /// Used to determine if the presigned URL is ready.
        public let presignedURLReady: Bool?

        @inlinable
        public init(presignedURL: String? = nil, presignedURLReady: Bool? = nil) {
            self.presignedURL = presignedURL
            self.presignedURLReady = presignedURLReady
        }

        private enum CodingKeys: String, CodingKey {
            case presignedURL = "PresignedURL"
            case presignedURLReady = "PresignedURLReady"
        }
    }

    public struct GetStudioSessionMappingInput: AWSEncodableShape {
        /// The globally unique identifier (GUID) of the user or group. For more information, see UserId and GroupId in the IAM Identity Center Identity Store API Reference. Either IdentityName or IdentityId must be specified.
        public let identityId: String?
        /// The name of the user or group to fetch. For more information, see UserName and DisplayName in the IAM Identity Center Identity Store API Reference. Either IdentityName or IdentityId must be specified.
        public let identityName: String?
        /// Specifies whether the identity to fetch is a user or a group.
        public let identityType: IdentityType?
        /// The ID of the Amazon EMR Studio.
        public let studioId: String?

        @inlinable
        public init(identityId: String? = nil, identityName: String? = nil, identityType: IdentityType? = nil, studioId: String? = nil) {
            self.identityId = identityId
            self.identityName = identityName
            self.identityType = identityType
            self.studioId = studioId
        }

        public func validate(name: String) throws {
            try self.validate(self.identityId, name: "identityId", parent: name, max: 256)
            try self.validate(self.identityId, name: "identityId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.identityName, name: "identityName", parent: name, max: 256)
            try self.validate(self.identityName, name: "identityName", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.studioId, name: "studioId", parent: name, max: 256)
            try self.validate(self.studioId, name: "studioId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case identityId = "IdentityId"
            case identityName = "IdentityName"
            case identityType = "IdentityType"
            case studioId = "StudioId"
        }
    }

    public struct GetStudioSessionMappingOutput: AWSDecodableShape {
        /// The session mapping details for the specified Amazon EMR Studio and identity, including session policy ARN and creation time.
        public let sessionMapping: SessionMappingDetail?

        @inlinable
        public init(sessionMapping: SessionMappingDetail? = nil) {
            self.sessionMapping = sessionMapping
        }

        private enum CodingKeys: String, CodingKey {
            case sessionMapping = "SessionMapping"
        }
    }

    public struct HadoopJarStepConfig: AWSEncodableShape & AWSDecodableShape {
        /// A list of command line arguments passed to the JAR file's main function when executed.
        public let args: [String]?
        /// A path to a JAR file run during the step.
        public let jar: String?
        /// The name of the main class in the specified Java file. If not specified, the JAR file should specify a Main-Class in its manifest file.
        public let mainClass: String?
        /// A list of Java properties that are set when the step runs. You can use these properties to pass key-value pairs to your main function.
        public let properties: [KeyValue]?

        @inlinable
        public init(args: [String]? = nil, jar: String? = nil, mainClass: String? = nil, properties: [KeyValue]? = nil) {
            self.args = args
            self.jar = jar
            self.mainClass = mainClass
            self.properties = properties
        }

        public func validate(name: String) throws {
            try self.args?.forEach {
                try validate($0, name: "args[]", parent: name, max: 10280)
                try validate($0, name: "args[]", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            }
            try self.validate(self.jar, name: "jar", parent: name, max: 10280)
            try self.validate(self.jar, name: "jar", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.mainClass, name: "mainClass", parent: name, max: 10280)
            try self.validate(self.mainClass, name: "mainClass", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.properties?.forEach {
                try $0.validate(name: "\(name).properties[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case args = "Args"
            case jar = "Jar"
            case mainClass = "MainClass"
            case properties = "Properties"
        }
    }

    public struct HadoopStepConfig: AWSDecodableShape {
        /// The list of command line arguments to pass to the JAR file's main function for execution.
        public let args: [String]?
        /// The path to the JAR file that runs during the step.
        public let jar: String?
        /// The name of the main class in the specified Java file. If not specified, the JAR file should specify a main class in its manifest file.
        public let mainClass: String?
        /// The list of Java properties that are set when the step runs. You can use these properties to pass key-value pairs to your main function.
        public let properties: [String: String]?

        @inlinable
        public init(args: [String]? = nil, jar: String? = nil, mainClass: String? = nil, properties: [String: String]? = nil) {
            self.args = args
            self.jar = jar
            self.mainClass = mainClass
            self.properties = properties
        }

        private enum CodingKeys: String, CodingKey {
            case args = "Args"
            case jar = "Jar"
            case mainClass = "MainClass"
            case properties = "Properties"
        }
    }

    public struct Instance: AWSDecodableShape {
        /// The list of Amazon EBS volumes that are attached to this instance.
        public let ebsVolumes: [EbsVolume]?
        /// The unique identifier of the instance in Amazon EC2.
        public let ec2InstanceId: String?
        /// The unique identifier for the instance in Amazon EMR.
        public let id: String?
        /// The unique identifier of the instance fleet to which an Amazon EC2 instance belongs.
        public let instanceFleetId: String?
        /// The identifier of the instance group to which this instance belongs.
        public let instanceGroupId: String?
        /// The Amazon EC2 instance type, for example m3.xlarge.
        public let instanceType: String?
        /// The instance purchasing option. Valid values are ON_DEMAND or SPOT.
        public let market: MarketType?
        /// The private DNS name of the instance.
        public let privateDnsName: String?
        /// The private IP address of the instance.
        public let privateIpAddress: String?
        /// The public DNS name of the instance.
        public let publicDnsName: String?
        /// The public IP address of the instance.
        public let publicIpAddress: String?
        /// The current status of the instance.
        public let status: InstanceStatus?

        @inlinable
        public init(ebsVolumes: [EbsVolume]? = nil, ec2InstanceId: String? = nil, id: String? = nil, instanceFleetId: String? = nil, instanceGroupId: String? = nil, instanceType: String? = nil, market: MarketType? = nil, privateDnsName: String? = nil, privateIpAddress: String? = nil, publicDnsName: String? = nil, publicIpAddress: String? = nil, status: InstanceStatus? = nil) {
            self.ebsVolumes = ebsVolumes
            self.ec2InstanceId = ec2InstanceId
            self.id = id
            self.instanceFleetId = instanceFleetId
            self.instanceGroupId = instanceGroupId
            self.instanceType = instanceType
            self.market = market
            self.privateDnsName = privateDnsName
            self.privateIpAddress = privateIpAddress
            self.publicDnsName = publicDnsName
            self.publicIpAddress = publicIpAddress
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case ebsVolumes = "EbsVolumes"
            case ec2InstanceId = "Ec2InstanceId"
            case id = "Id"
            case instanceFleetId = "InstanceFleetId"
            case instanceGroupId = "InstanceGroupId"
            case instanceType = "InstanceType"
            case market = "Market"
            case privateDnsName = "PrivateDnsName"
            case privateIpAddress = "PrivateIpAddress"
            case publicDnsName = "PublicDnsName"
            case publicIpAddress = "PublicIpAddress"
            case status = "Status"
        }
    }

    public struct InstanceFleet: AWSDecodableShape {
        /// Reserved.
        public let context: String?
        /// The unique identifier of the instance fleet.
        public let id: String?
        /// The node type that the instance fleet hosts. Valid values are MASTER, CORE, or TASK.
        public let instanceFleetType: InstanceFleetType?
        /// An array of specifications for the instance types that comprise an instance fleet.
        public let instanceTypeSpecifications: [InstanceTypeSpecification]?
        /// Describes the launch specification for an instance fleet.
        public let launchSpecifications: InstanceFleetProvisioningSpecifications?
        /// A friendly name for the instance fleet.
        public let name: String?
        /// The number of On-Demand units that have been provisioned for the instance fleet to fulfill TargetOnDemandCapacity. This provisioned capacity might be less than or greater than TargetOnDemandCapacity.
        public let provisionedOnDemandCapacity: Int?
        /// The number of Spot units that have been provisioned for this instance fleet to fulfill TargetSpotCapacity. This provisioned capacity might be less than or greater than TargetSpotCapacity.
        public let provisionedSpotCapacity: Int?
        /// The resize specification for the instance fleet.
        public let resizeSpecifications: InstanceFleetResizingSpecifications?
        /// The current status of the instance fleet.
        public let status: InstanceFleetStatus?
        /// The target capacity of On-Demand units for the instance fleet, which determines how many On-Demand Instances to provision. When the instance fleet launches, Amazon EMR tries to provision On-Demand Instances as specified by InstanceTypeConfig. Each instance configuration has a specified WeightedCapacity. When an On-Demand Instance is provisioned, the WeightedCapacity units count toward the target capacity. Amazon EMR provisions instances until the target capacity is totally fulfilled, even if this results in an overage. For example, if there are 2 units remaining to fulfill capacity, and Amazon EMR can only provision an instance with a WeightedCapacity of 5 units, the instance is provisioned, and the target capacity is exceeded by 3 units. You can use InstanceFleet$ProvisionedOnDemandCapacity to determine the Spot capacity units that have been provisioned for the instance fleet.  If not specified or set to 0, only Spot Instances are provisioned for the instance fleet using TargetSpotCapacity. At least one of TargetSpotCapacity and TargetOnDemandCapacity should be greater than 0. For a master instance fleet, only one of TargetSpotCapacity and TargetOnDemandCapacity can be specified, and its value must be 1.
        public let targetOnDemandCapacity: Int?
        /// The target capacity of Spot units for the instance fleet, which determines how many Spot Instances to provision. When the instance fleet launches, Amazon EMR tries to provision Spot Instances as specified by InstanceTypeConfig. Each instance configuration has a specified WeightedCapacity. When a Spot instance is provisioned, the WeightedCapacity units count toward the target capacity. Amazon EMR provisions instances until the target capacity is totally fulfilled, even if this results in an overage. For example, if there are 2 units remaining to fulfill capacity, and Amazon EMR can only provision an instance with a WeightedCapacity of 5 units, the instance is provisioned, and the target capacity is exceeded by 3 units. You can use InstanceFleet$ProvisionedSpotCapacity to determine the Spot capacity units that have been provisioned for the instance fleet.  If not specified or set to 0, only On-Demand Instances are provisioned for the instance fleet. At least one of TargetSpotCapacity and TargetOnDemandCapacity should be greater than 0. For a master instance fleet, only one of TargetSpotCapacity and TargetOnDemandCapacity can be specified, and its value must be 1.
        public let targetSpotCapacity: Int?

        @inlinable
        public init(context: String? = nil, id: String? = nil, instanceFleetType: InstanceFleetType? = nil, instanceTypeSpecifications: [InstanceTypeSpecification]? = nil, launchSpecifications: InstanceFleetProvisioningSpecifications? = nil, name: String? = nil, provisionedOnDemandCapacity: Int? = nil, provisionedSpotCapacity: Int? = nil, resizeSpecifications: InstanceFleetResizingSpecifications? = nil, status: InstanceFleetStatus? = nil, targetOnDemandCapacity: Int? = nil, targetSpotCapacity: Int? = nil) {
            self.context = context
            self.id = id
            self.instanceFleetType = instanceFleetType
            self.instanceTypeSpecifications = instanceTypeSpecifications
            self.launchSpecifications = launchSpecifications
            self.name = name
            self.provisionedOnDemandCapacity = provisionedOnDemandCapacity
            self.provisionedSpotCapacity = provisionedSpotCapacity
            self.resizeSpecifications = resizeSpecifications
            self.status = status
            self.targetOnDemandCapacity = targetOnDemandCapacity
            self.targetSpotCapacity = targetSpotCapacity
        }

        private enum CodingKeys: String, CodingKey {
            case context = "Context"
            case id = "Id"
            case instanceFleetType = "InstanceFleetType"
            case instanceTypeSpecifications = "InstanceTypeSpecifications"
            case launchSpecifications = "LaunchSpecifications"
            case name = "Name"
            case provisionedOnDemandCapacity = "ProvisionedOnDemandCapacity"
            case provisionedSpotCapacity = "ProvisionedSpotCapacity"
            case resizeSpecifications = "ResizeSpecifications"
            case status = "Status"
            case targetOnDemandCapacity = "TargetOnDemandCapacity"
            case targetSpotCapacity = "TargetSpotCapacity"
        }
    }

    public struct InstanceFleetConfig: AWSEncodableShape {
        /// Reserved.
        public let context: String?
        /// The node type that the instance fleet hosts. Valid values are MASTER, CORE, and TASK.
        public let instanceFleetType: InstanceFleetType?
        /// The instance type configurations that define the Amazon EC2 instances in the instance fleet.
        public let instanceTypeConfigs: [InstanceTypeConfig]?
        /// The launch specification for the instance fleet.
        public let launchSpecifications: InstanceFleetProvisioningSpecifications?
        /// The friendly name of the instance fleet.
        public let name: String?
        /// The resize specification for the instance fleet.
        public let resizeSpecifications: InstanceFleetResizingSpecifications?
        /// The target capacity of On-Demand units for the instance fleet, which determines how many On-Demand Instances to provision. When the instance fleet launches, Amazon EMR tries to provision On-Demand Instances as specified by InstanceTypeConfig. Each instance configuration has a specified WeightedCapacity. When an On-Demand Instance is provisioned, the WeightedCapacity units count toward the target capacity. Amazon EMR provisions instances until the target capacity is totally fulfilled, even if this results in an overage. For example, if there are 2 units remaining to fulfill capacity, and Amazon EMR can only provision an instance with a WeightedCapacity of 5 units, the instance is provisioned, and the target capacity is exceeded by 3 units.  If not specified or set to 0, only Spot Instances are provisioned for the instance fleet using TargetSpotCapacity. At least one of TargetSpotCapacity and TargetOnDemandCapacity should be greater than 0. For a master instance fleet, only one of TargetSpotCapacity and TargetOnDemandCapacity can be specified, and its value must be 1.
        public let targetOnDemandCapacity: Int?
        /// The target capacity of Spot units for the instance fleet, which determines how many Spot Instances to provision. When the instance fleet launches, Amazon EMR tries to provision Spot Instances as specified by InstanceTypeConfig. Each instance configuration has a specified WeightedCapacity. When a Spot Instance is provisioned, the WeightedCapacity units count toward the target capacity. Amazon EMR provisions instances until the target capacity is totally fulfilled, even if this results in an overage. For example, if there are 2 units remaining to fulfill capacity, and Amazon EMR can only provision an instance with a WeightedCapacity of 5 units, the instance is provisioned, and the target capacity is exceeded by 3 units.  If not specified or set to 0, only On-Demand Instances are provisioned for the instance fleet. At least one of TargetSpotCapacity and TargetOnDemandCapacity should be greater than 0. For a master instance fleet, only one of TargetSpotCapacity and TargetOnDemandCapacity can be specified, and its value must be 1.
        public let targetSpotCapacity: Int?

        @inlinable
        public init(context: String? = nil, instanceFleetType: InstanceFleetType? = nil, instanceTypeConfigs: [InstanceTypeConfig]? = nil, launchSpecifications: InstanceFleetProvisioningSpecifications? = nil, name: String? = nil, resizeSpecifications: InstanceFleetResizingSpecifications? = nil, targetOnDemandCapacity: Int? = nil, targetSpotCapacity: Int? = nil) {
            self.context = context
            self.instanceFleetType = instanceFleetType
            self.instanceTypeConfigs = instanceTypeConfigs
            self.launchSpecifications = launchSpecifications
            self.name = name
            self.resizeSpecifications = resizeSpecifications
            self.targetOnDemandCapacity = targetOnDemandCapacity
            self.targetSpotCapacity = targetSpotCapacity
        }

        public func validate(name: String) throws {
            try self.validate(self.context, name: "context", parent: name, max: 256)
            try self.validate(self.context, name: "context", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.instanceTypeConfigs?.forEach {
                try $0.validate(name: "\(name).instanceTypeConfigs[]")
            }
            try self.launchSpecifications?.validate(name: "\(name).launchSpecifications")
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.resizeSpecifications?.validate(name: "\(name).resizeSpecifications")
            try self.validate(self.targetOnDemandCapacity, name: "targetOnDemandCapacity", parent: name, min: 0)
            try self.validate(self.targetSpotCapacity, name: "targetSpotCapacity", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case context = "Context"
            case instanceFleetType = "InstanceFleetType"
            case instanceTypeConfigs = "InstanceTypeConfigs"
            case launchSpecifications = "LaunchSpecifications"
            case name = "Name"
            case resizeSpecifications = "ResizeSpecifications"
            case targetOnDemandCapacity = "TargetOnDemandCapacity"
            case targetSpotCapacity = "TargetSpotCapacity"
        }
    }

    public struct InstanceFleetModifyConfig: AWSEncodableShape {
        /// Reserved.
        public let context: String?
        /// A unique identifier for the instance fleet.
        public let instanceFleetId: String?
        /// An array of InstanceTypeConfig objects that specify how Amazon EMR provisions Amazon EC2 instances when it fulfills On-Demand and Spot capacities. For more information, see InstanceTypeConfig.
        public let instanceTypeConfigs: [InstanceTypeConfig]?
        /// The resize specification for the instance fleet.
        public let resizeSpecifications: InstanceFleetResizingSpecifications?
        /// The target capacity of On-Demand units for the instance fleet. For more information see InstanceFleetConfig$TargetOnDemandCapacity.
        public let targetOnDemandCapacity: Int?
        /// The target capacity of Spot units for the instance fleet. For more information, see InstanceFleetConfig$TargetSpotCapacity.
        public let targetSpotCapacity: Int?

        @inlinable
        public init(context: String? = nil, instanceFleetId: String? = nil, instanceTypeConfigs: [InstanceTypeConfig]? = nil, resizeSpecifications: InstanceFleetResizingSpecifications? = nil, targetOnDemandCapacity: Int? = nil, targetSpotCapacity: Int? = nil) {
            self.context = context
            self.instanceFleetId = instanceFleetId
            self.instanceTypeConfigs = instanceTypeConfigs
            self.resizeSpecifications = resizeSpecifications
            self.targetOnDemandCapacity = targetOnDemandCapacity
            self.targetSpotCapacity = targetSpotCapacity
        }

        public func validate(name: String) throws {
            try self.validate(self.context, name: "context", parent: name, max: 256)
            try self.validate(self.context, name: "context", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.instanceTypeConfigs?.forEach {
                try $0.validate(name: "\(name).instanceTypeConfigs[]")
            }
            try self.resizeSpecifications?.validate(name: "\(name).resizeSpecifications")
            try self.validate(self.targetOnDemandCapacity, name: "targetOnDemandCapacity", parent: name, min: 0)
            try self.validate(self.targetSpotCapacity, name: "targetSpotCapacity", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case context = "Context"
            case instanceFleetId = "InstanceFleetId"
            case instanceTypeConfigs = "InstanceTypeConfigs"
            case resizeSpecifications = "ResizeSpecifications"
            case targetOnDemandCapacity = "TargetOnDemandCapacity"
            case targetSpotCapacity = "TargetSpotCapacity"
        }
    }

    public struct InstanceFleetProvisioningSpecifications: AWSEncodableShape & AWSDecodableShape {
        ///  The launch specification for On-Demand Instances in the instance fleet, which determines the allocation strategy and capacity reservation options.  The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x versions. On-Demand Instances allocation strategy is available in Amazon EMR releases 5.12.1 and later.
        public let onDemandSpecification: OnDemandProvisioningSpecification?
        /// The launch specification for Spot instances in the fleet, which determines the allocation strategy, defined duration, and provisioning timeout behavior.
        public let spotSpecification: SpotProvisioningSpecification?

        @inlinable
        public init(onDemandSpecification: OnDemandProvisioningSpecification? = nil, spotSpecification: SpotProvisioningSpecification? = nil) {
            self.onDemandSpecification = onDemandSpecification
            self.spotSpecification = spotSpecification
        }

        public func validate(name: String) throws {
            try self.onDemandSpecification?.validate(name: "\(name).onDemandSpecification")
            try self.spotSpecification?.validate(name: "\(name).spotSpecification")
        }

        private enum CodingKeys: String, CodingKey {
            case onDemandSpecification = "OnDemandSpecification"
            case spotSpecification = "SpotSpecification"
        }
    }

    public struct InstanceFleetResizingSpecifications: AWSEncodableShape & AWSDecodableShape {
        /// The resize specification for On-Demand Instances in the instance fleet, which contains the allocation strategy, capacity reservation options, and the resize timeout period.
        public let onDemandResizeSpecification: OnDemandResizingSpecification?
        /// The resize specification for Spot Instances in the instance fleet, which contains the allocation strategy and the resize timeout period.
        public let spotResizeSpecification: SpotResizingSpecification?

        @inlinable
        public init(onDemandResizeSpecification: OnDemandResizingSpecification? = nil, spotResizeSpecification: SpotResizingSpecification? = nil) {
            self.onDemandResizeSpecification = onDemandResizeSpecification
            self.spotResizeSpecification = spotResizeSpecification
        }

        public func validate(name: String) throws {
            try self.onDemandResizeSpecification?.validate(name: "\(name).onDemandResizeSpecification")
            try self.spotResizeSpecification?.validate(name: "\(name).spotResizeSpecification")
        }

        private enum CodingKeys: String, CodingKey {
            case onDemandResizeSpecification = "OnDemandResizeSpecification"
            case spotResizeSpecification = "SpotResizeSpecification"
        }
    }

    public struct InstanceFleetStateChangeReason: AWSDecodableShape {
        /// A code corresponding to the reason the state change occurred.
        public let code: InstanceFleetStateChangeReasonCode?
        /// An explanatory message.
        public let message: String?

        @inlinable
        public init(code: InstanceFleetStateChangeReasonCode? = nil, message: String? = nil) {
            self.code = code
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case code = "Code"
            case message = "Message"
        }
    }

    public struct InstanceFleetStatus: AWSDecodableShape {
        /// A code representing the instance fleet status.    PROVISIONING—The instance fleet is provisioning Amazon EC2 resources and is not yet ready to run jobs.    BOOTSTRAPPING—Amazon EC2 instances and other resources have been provisioned and the bootstrap actions specified for the instances are underway.    RUNNING—Amazon EC2 instances and other resources are running. They are either executing jobs or waiting to execute jobs.    RESIZING—A resize operation is underway. Amazon EC2 instances are either being added or removed.    SUSPENDED—A resize operation could not complete. Existing Amazon EC2 instances are running, but instances can't be added or removed.    TERMINATING—The instance fleet is terminating Amazon EC2 instances.    TERMINATED—The instance fleet is no longer active, and all Amazon EC2 instances have been terminated.
        public let state: InstanceFleetState?
        /// Provides status change reason details for the instance fleet.
        public let stateChangeReason: InstanceFleetStateChangeReason?
        /// Provides historical timestamps for the instance fleet, including the time of creation, the time it became ready to run jobs, and the time of termination.
        public let timeline: InstanceFleetTimeline?

        @inlinable
        public init(state: InstanceFleetState? = nil, stateChangeReason: InstanceFleetStateChangeReason? = nil, timeline: InstanceFleetTimeline? = nil) {
            self.state = state
            self.stateChangeReason = stateChangeReason
            self.timeline = timeline
        }

        private enum CodingKeys: String, CodingKey {
            case state = "State"
            case stateChangeReason = "StateChangeReason"
            case timeline = "Timeline"
        }
    }

    public struct InstanceFleetTimeline: AWSDecodableShape {
        /// The time and date the instance fleet was created.
        public let creationDateTime: Date?
        /// The time and date the instance fleet terminated.
        public let endDateTime: Date?
        /// The time and date the instance fleet was ready to run jobs.
        public let readyDateTime: Date?

        @inlinable
        public init(creationDateTime: Date? = nil, endDateTime: Date? = nil, readyDateTime: Date? = nil) {
            self.creationDateTime = creationDateTime
            self.endDateTime = endDateTime
            self.readyDateTime = readyDateTime
        }

        private enum CodingKeys: String, CodingKey {
            case creationDateTime = "CreationDateTime"
            case endDateTime = "EndDateTime"
            case readyDateTime = "ReadyDateTime"
        }
    }

    public struct InstanceGroup: AWSDecodableShape {
        /// An automatic scaling policy for a core instance group or task instance group in an Amazon EMR cluster. The automatic scaling policy defines how an instance group dynamically adds and terminates Amazon EC2 instances in response to the value of a CloudWatch metric. See PutAutoScalingPolicy.
        public let autoScalingPolicy: AutoScalingPolicyDescription?
        /// If specified, indicates that the instance group uses Spot Instances. This is the maximum price you are willing to pay for Spot Instances. Specify OnDemandPrice to set the amount equal to the On-Demand price, or specify an amount in USD.
        public let bidPrice: String?
        ///  Amazon EMR releases 4.x or later.  The list of configurations supplied for an Amazon EMR cluster instance group. You can specify a separate configuration for each instance group (master, core, and task).
        public let configurations: [Configuration]?
        /// The version number of the requested configuration specification for this instance group.
        public let configurationsVersion: Int64?
        /// The custom AMI ID to use for the provisioned instance group.
        public let customAmiId: String?
        /// The EBS block devices that are mapped to this instance group.
        public let ebsBlockDevices: [EbsBlockDevice]?
        /// If the instance group is EBS-optimized. An Amazon EBS-optimized instance uses an optimized configuration stack and provides additional, dedicated capacity for Amazon EBS I/O.
        public let ebsOptimized: Bool?
        /// The identifier of the instance group.
        public let id: String?
        /// The type of the instance group. Valid values are MASTER, CORE or TASK.
        public let instanceGroupType: InstanceGroupType?
        /// The Amazon EC2 instance type for all instances in the instance group.
        public let instanceType: String?
        /// A list of configurations that were successfully applied for an instance group last time.
        public let lastSuccessfullyAppliedConfigurations: [Configuration]?
        /// The version number of a configuration specification that was successfully applied for an instance group last time.
        public let lastSuccessfullyAppliedConfigurationsVersion: Int64?
        /// The marketplace to provision instances for this group. Valid values are ON_DEMAND or SPOT.
        public let market: MarketType?
        /// The name of the instance group.
        public let name: String?
        /// The target number of instances for the instance group.
        public let requestedInstanceCount: Int?
        /// The number of instances currently running in this instance group.
        public let runningInstanceCount: Int?
        /// Policy for customizing shrink operations.
        public let shrinkPolicy: ShrinkPolicy?
        /// The current status of the instance group.
        public let status: InstanceGroupStatus?

        @inlinable
        public init(autoScalingPolicy: AutoScalingPolicyDescription? = nil, bidPrice: String? = nil, configurations: [Configuration]? = nil, configurationsVersion: Int64? = nil, customAmiId: String? = nil, ebsBlockDevices: [EbsBlockDevice]? = nil, ebsOptimized: Bool? = nil, id: String? = nil, instanceGroupType: InstanceGroupType? = nil, instanceType: String? = nil, lastSuccessfullyAppliedConfigurations: [Configuration]? = nil, lastSuccessfullyAppliedConfigurationsVersion: Int64? = nil, market: MarketType? = nil, name: String? = nil, requestedInstanceCount: Int? = nil, runningInstanceCount: Int? = nil, shrinkPolicy: ShrinkPolicy? = nil, status: InstanceGroupStatus? = nil) {
            self.autoScalingPolicy = autoScalingPolicy
            self.bidPrice = bidPrice
            self.configurations = configurations
            self.configurationsVersion = configurationsVersion
            self.customAmiId = customAmiId
            self.ebsBlockDevices = ebsBlockDevices
            self.ebsOptimized = ebsOptimized
            self.id = id
            self.instanceGroupType = instanceGroupType
            self.instanceType = instanceType
            self.lastSuccessfullyAppliedConfigurations = lastSuccessfullyAppliedConfigurations
            self.lastSuccessfullyAppliedConfigurationsVersion = lastSuccessfullyAppliedConfigurationsVersion
            self.market = market
            self.name = name
            self.requestedInstanceCount = requestedInstanceCount
            self.runningInstanceCount = runningInstanceCount
            self.shrinkPolicy = shrinkPolicy
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case autoScalingPolicy = "AutoScalingPolicy"
            case bidPrice = "BidPrice"
            case configurations = "Configurations"
            case configurationsVersion = "ConfigurationsVersion"
            case customAmiId = "CustomAmiId"
            case ebsBlockDevices = "EbsBlockDevices"
            case ebsOptimized = "EbsOptimized"
            case id = "Id"
            case instanceGroupType = "InstanceGroupType"
            case instanceType = "InstanceType"
            case lastSuccessfullyAppliedConfigurations = "LastSuccessfullyAppliedConfigurations"
            case lastSuccessfullyAppliedConfigurationsVersion = "LastSuccessfullyAppliedConfigurationsVersion"
            case market = "Market"
            case name = "Name"
            case requestedInstanceCount = "RequestedInstanceCount"
            case runningInstanceCount = "RunningInstanceCount"
            case shrinkPolicy = "ShrinkPolicy"
            case status = "Status"
        }
    }

    public struct InstanceGroupConfig: AWSEncodableShape {
        /// An automatic scaling policy for a core instance group or task instance group in an Amazon EMR cluster. The automatic scaling policy defines how an instance group dynamically adds and terminates Amazon EC2 instances in response to the value of a CloudWatch metric. See PutAutoScalingPolicy.
        public let autoScalingPolicy: AutoScalingPolicy?
        /// If specified, indicates that the instance group uses Spot Instances. This is the maximum price you are willing to pay for Spot Instances. Specify OnDemandPrice to set the amount equal to the On-Demand price, or specify an amount in USD.
        public let bidPrice: String?
        ///  Amazon EMR releases 4.x or later.  The list of configurations supplied for an Amazon EMR cluster instance group. You can specify a separate configuration for each instance group (master, core, and task).
        public let configurations: [Configuration]?
        /// The custom AMI ID to use for the provisioned instance group.
        public let customAmiId: String?
        /// EBS configurations that will be attached to each Amazon EC2 instance in the instance group.
        public let ebsConfiguration: EbsConfiguration?
        /// Target number of instances for the instance group.
        public let instanceCount: Int?
        /// The role of the instance group in the cluster.
        public let instanceRole: InstanceRoleType?
        /// The Amazon EC2 instance type for all instances in the instance group.
        public let instanceType: String?
        /// Market type of the Amazon EC2 instances used to create a cluster node.
        public let market: MarketType?
        /// Friendly name given to the instance group.
        public let name: String?

        @inlinable
        public init(autoScalingPolicy: AutoScalingPolicy? = nil, bidPrice: String? = nil, configurations: [Configuration]? = nil, customAmiId: String? = nil, ebsConfiguration: EbsConfiguration? = nil, instanceCount: Int? = nil, instanceRole: InstanceRoleType? = nil, instanceType: String? = nil, market: MarketType? = nil, name: String? = nil) {
            self.autoScalingPolicy = autoScalingPolicy
            self.bidPrice = bidPrice
            self.configurations = configurations
            self.customAmiId = customAmiId
            self.ebsConfiguration = ebsConfiguration
            self.instanceCount = instanceCount
            self.instanceRole = instanceRole
            self.instanceType = instanceType
            self.market = market
            self.name = name
        }

        public func validate(name: String) throws {
            try self.autoScalingPolicy?.validate(name: "\(name).autoScalingPolicy")
            try self.validate(self.bidPrice, name: "bidPrice", parent: name, max: 256)
            try self.validate(self.bidPrice, name: "bidPrice", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.customAmiId, name: "customAmiId", parent: name, max: 256)
            try self.validate(self.customAmiId, name: "customAmiId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.ebsConfiguration?.validate(name: "\(name).ebsConfiguration")
            try self.validate(self.instanceType, name: "instanceType", parent: name, max: 256)
            try self.validate(self.instanceType, name: "instanceType", parent: name, min: 1)
            try self.validate(self.instanceType, name: "instanceType", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case autoScalingPolicy = "AutoScalingPolicy"
            case bidPrice = "BidPrice"
            case configurations = "Configurations"
            case customAmiId = "CustomAmiId"
            case ebsConfiguration = "EbsConfiguration"
            case instanceCount = "InstanceCount"
            case instanceRole = "InstanceRole"
            case instanceType = "InstanceType"
            case market = "Market"
            case name = "Name"
        }
    }

    public struct InstanceGroupDetail: AWSDecodableShape {
        /// If specified, indicates that the instance group uses Spot Instances. This is the maximum price you are willing to pay for Spot Instances. Specify OnDemandPrice to set the amount equal to the On-Demand price, or specify an amount in USD.
        public let bidPrice: String?
        /// The date/time the instance group was created.
        public let creationDateTime: Date?
        /// The custom AMI ID to use for the provisioned instance group.
        public let customAmiId: String?
        /// The date/time the instance group was terminated.
        public let endDateTime: Date?
        /// Unique identifier for the instance group.
        public let instanceGroupId: String?
        /// Target number of instances to run in the instance group.
        public let instanceRequestCount: Int?
        /// Instance group role in the cluster
        public let instanceRole: InstanceRoleType?
        /// Actual count of running instances.
        public let instanceRunningCount: Int?
        /// Amazon EC2 instance type.
        public let instanceType: String?
        /// Details regarding the state of the instance group.
        public let lastStateChangeReason: String?
        /// Market type of the Amazon EC2 instances used to create a cluster node.
        public let market: MarketType?
        /// Friendly name for the instance group.
        public let name: String?
        /// The date/time the instance group was available to the cluster.
        public let readyDateTime: Date?
        /// The date/time the instance group was started.
        public let startDateTime: Date?
        /// State of instance group. The following values are no longer supported: STARTING, TERMINATED, and FAILED.
        public let state: InstanceGroupState?

        @inlinable
        public init(bidPrice: String? = nil, creationDateTime: Date? = nil, customAmiId: String? = nil, endDateTime: Date? = nil, instanceGroupId: String? = nil, instanceRequestCount: Int? = nil, instanceRole: InstanceRoleType? = nil, instanceRunningCount: Int? = nil, instanceType: String? = nil, lastStateChangeReason: String? = nil, market: MarketType? = nil, name: String? = nil, readyDateTime: Date? = nil, startDateTime: Date? = nil, state: InstanceGroupState? = nil) {
            self.bidPrice = bidPrice
            self.creationDateTime = creationDateTime
            self.customAmiId = customAmiId
            self.endDateTime = endDateTime
            self.instanceGroupId = instanceGroupId
            self.instanceRequestCount = instanceRequestCount
            self.instanceRole = instanceRole
            self.instanceRunningCount = instanceRunningCount
            self.instanceType = instanceType
            self.lastStateChangeReason = lastStateChangeReason
            self.market = market
            self.name = name
            self.readyDateTime = readyDateTime
            self.startDateTime = startDateTime
            self.state = state
        }

        private enum CodingKeys: String, CodingKey {
            case bidPrice = "BidPrice"
            case creationDateTime = "CreationDateTime"
            case customAmiId = "CustomAmiId"
            case endDateTime = "EndDateTime"
            case instanceGroupId = "InstanceGroupId"
            case instanceRequestCount = "InstanceRequestCount"
            case instanceRole = "InstanceRole"
            case instanceRunningCount = "InstanceRunningCount"
            case instanceType = "InstanceType"
            case lastStateChangeReason = "LastStateChangeReason"
            case market = "Market"
            case name = "Name"
            case readyDateTime = "ReadyDateTime"
            case startDateTime = "StartDateTime"
            case state = "State"
        }
    }

    public struct InstanceGroupModifyConfig: AWSEncodableShape {
        /// A list of new or modified configurations to apply for an instance group.
        public let configurations: [Configuration]?
        /// The Amazon EC2 InstanceIds to terminate. After you terminate the instances, the instance group will not return to its original requested size.
        public let ec2InstanceIdsToTerminate: [String]?
        /// Target size for the instance group.
        public let instanceCount: Int?
        /// Unique ID of the instance group to modify.
        public let instanceGroupId: String?
        /// Type of reconfiguration requested. Valid values are MERGE and OVERWRITE.
        public let reconfigurationType: ReconfigurationType?
        /// Policy for customizing shrink operations.
        public let shrinkPolicy: ShrinkPolicy?

        @inlinable
        public init(configurations: [Configuration]? = nil, ec2InstanceIdsToTerminate: [String]? = nil, instanceCount: Int? = nil, instanceGroupId: String? = nil, reconfigurationType: ReconfigurationType? = nil, shrinkPolicy: ShrinkPolicy? = nil) {
            self.configurations = configurations
            self.ec2InstanceIdsToTerminate = ec2InstanceIdsToTerminate
            self.instanceCount = instanceCount
            self.instanceGroupId = instanceGroupId
            self.reconfigurationType = reconfigurationType
            self.shrinkPolicy = shrinkPolicy
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceGroupId, name: "instanceGroupId", parent: name, max: 256)
            try self.validate(self.instanceGroupId, name: "instanceGroupId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case configurations = "Configurations"
            case ec2InstanceIdsToTerminate = "EC2InstanceIdsToTerminate"
            case instanceCount = "InstanceCount"
            case instanceGroupId = "InstanceGroupId"
            case reconfigurationType = "ReconfigurationType"
            case shrinkPolicy = "ShrinkPolicy"
        }
    }

    public struct InstanceGroupStateChangeReason: AWSDecodableShape {
        /// The programmable code for the state change reason.
        public let code: InstanceGroupStateChangeReasonCode?
        /// The status change reason description.
        public let message: String?

        @inlinable
        public init(code: InstanceGroupStateChangeReasonCode? = nil, message: String? = nil) {
            self.code = code
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case code = "Code"
            case message = "Message"
        }
    }

    public struct InstanceGroupStatus: AWSDecodableShape {
        /// The current state of the instance group.
        public let state: InstanceGroupState?
        /// The status change reason details for the instance group.
        public let stateChangeReason: InstanceGroupStateChangeReason?
        /// The timeline of the instance group status over time.
        public let timeline: InstanceGroupTimeline?

        @inlinable
        public init(state: InstanceGroupState? = nil, stateChangeReason: InstanceGroupStateChangeReason? = nil, timeline: InstanceGroupTimeline? = nil) {
            self.state = state
            self.stateChangeReason = stateChangeReason
            self.timeline = timeline
        }

        private enum CodingKeys: String, CodingKey {
            case state = "State"
            case stateChangeReason = "StateChangeReason"
            case timeline = "Timeline"
        }
    }

    public struct InstanceGroupTimeline: AWSDecodableShape {
        /// The creation date and time of the instance group.
        public let creationDateTime: Date?
        /// The date and time when the instance group terminated.
        public let endDateTime: Date?
        /// The date and time when the instance group became ready to perform tasks.
        public let readyDateTime: Date?

        @inlinable
        public init(creationDateTime: Date? = nil, endDateTime: Date? = nil, readyDateTime: Date? = nil) {
            self.creationDateTime = creationDateTime
            self.endDateTime = endDateTime
            self.readyDateTime = readyDateTime
        }

        private enum CodingKeys: String, CodingKey {
            case creationDateTime = "CreationDateTime"
            case endDateTime = "EndDateTime"
            case readyDateTime = "ReadyDateTime"
        }
    }

    public struct InstanceResizePolicy: AWSEncodableShape & AWSDecodableShape {
        /// Specific list of instances to be protected when shrinking an instance group.
        public let instancesToProtect: [String]?
        /// Specific list of instances to be terminated when shrinking an instance group.
        public let instancesToTerminate: [String]?
        /// Decommissioning timeout override for the specific list of instances to be terminated.
        public let instanceTerminationTimeout: Int?

        @inlinable
        public init(instancesToProtect: [String]? = nil, instancesToTerminate: [String]? = nil, instanceTerminationTimeout: Int? = nil) {
            self.instancesToProtect = instancesToProtect
            self.instancesToTerminate = instancesToTerminate
            self.instanceTerminationTimeout = instanceTerminationTimeout
        }

        private enum CodingKeys: String, CodingKey {
            case instancesToProtect = "InstancesToProtect"
            case instancesToTerminate = "InstancesToTerminate"
            case instanceTerminationTimeout = "InstanceTerminationTimeout"
        }
    }

    public struct InstanceStateChangeReason: AWSDecodableShape {
        /// The programmable code for the state change reason.
        public let code: InstanceStateChangeReasonCode?
        /// The status change reason description.
        public let message: String?

        @inlinable
        public init(code: InstanceStateChangeReasonCode? = nil, message: String? = nil) {
            self.code = code
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case code = "Code"
            case message = "Message"
        }
    }

    public struct InstanceStatus: AWSDecodableShape {
        /// The current state of the instance.
        public let state: InstanceState?
        /// The details of the status change reason for the instance.
        public let stateChangeReason: InstanceStateChangeReason?
        /// The timeline of the instance status over time.
        public let timeline: InstanceTimeline?

        @inlinable
        public init(state: InstanceState? = nil, stateChangeReason: InstanceStateChangeReason? = nil, timeline: InstanceTimeline? = nil) {
            self.state = state
            self.stateChangeReason = stateChangeReason
            self.timeline = timeline
        }

        private enum CodingKeys: String, CodingKey {
            case state = "State"
            case stateChangeReason = "StateChangeReason"
            case timeline = "Timeline"
        }
    }

    public struct InstanceTimeline: AWSDecodableShape {
        /// The creation date and time of the instance.
        public let creationDateTime: Date?
        /// The date and time when the instance was terminated.
        public let endDateTime: Date?
        /// The date and time when the instance was ready to perform tasks.
        public let readyDateTime: Date?

        @inlinable
        public init(creationDateTime: Date? = nil, endDateTime: Date? = nil, readyDateTime: Date? = nil) {
            self.creationDateTime = creationDateTime
            self.endDateTime = endDateTime
            self.readyDateTime = readyDateTime
        }

        private enum CodingKeys: String, CodingKey {
            case creationDateTime = "CreationDateTime"
            case endDateTime = "EndDateTime"
            case readyDateTime = "ReadyDateTime"
        }
    }

    public struct InstanceTypeConfig: AWSEncodableShape {
        /// The bid price for each Amazon EC2 Spot Instance type as defined by InstanceType. Expressed in USD. If neither BidPrice nor BidPriceAsPercentageOfOnDemandPrice is provided, BidPriceAsPercentageOfOnDemandPrice defaults to 100%.
        public let bidPrice: String?
        /// The bid price, as a percentage of On-Demand price, for each Amazon EC2 Spot Instance as defined by InstanceType. Expressed as a number (for example, 20 specifies 20%). If neither BidPrice nor BidPriceAsPercentageOfOnDemandPrice is provided, BidPriceAsPercentageOfOnDemandPrice defaults to 100%.
        public let bidPriceAsPercentageOfOnDemandPrice: Double?
        /// A configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster.
        public let configurations: [Configuration]?
        /// The custom AMI ID to use for the instance type.
        public let customAmiId: String?
        /// The configuration of Amazon Elastic Block Store (Amazon EBS) attached to each instance as defined by InstanceType.
        public let ebsConfiguration: EbsConfiguration?
        /// An Amazon EC2 instance type, such as m3.xlarge.
        public let instanceType: String?
        /// The priority at which Amazon EMR launches the Amazon EC2 instances with this instance type.  Priority starts at 0, which is the highest priority. Amazon EMR considers the highest priority first.
        public let priority: Double?
        /// The number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined in InstanceFleetConfig. This value is 1 for a master instance fleet, and must be 1 or greater for core and task instance fleets. Defaults to 1 if not specified.
        public let weightedCapacity: Int?

        @inlinable
        public init(bidPrice: String? = nil, bidPriceAsPercentageOfOnDemandPrice: Double? = nil, configurations: [Configuration]? = nil, customAmiId: String? = nil, ebsConfiguration: EbsConfiguration? = nil, instanceType: String? = nil, priority: Double? = nil, weightedCapacity: Int? = nil) {
            self.bidPrice = bidPrice
            self.bidPriceAsPercentageOfOnDemandPrice = bidPriceAsPercentageOfOnDemandPrice
            self.configurations = configurations
            self.customAmiId = customAmiId
            self.ebsConfiguration = ebsConfiguration
            self.instanceType = instanceType
            self.priority = priority
            self.weightedCapacity = weightedCapacity
        }

        public func validate(name: String) throws {
            try self.validate(self.bidPrice, name: "bidPrice", parent: name, max: 256)
            try self.validate(self.bidPrice, name: "bidPrice", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.bidPriceAsPercentageOfOnDemandPrice, name: "bidPriceAsPercentageOfOnDemandPrice", parent: name, min: 0.0)
            try self.validate(self.customAmiId, name: "customAmiId", parent: name, max: 256)
            try self.validate(self.customAmiId, name: "customAmiId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.ebsConfiguration?.validate(name: "\(name).ebsConfiguration")
            try self.validate(self.instanceType, name: "instanceType", parent: name, max: 256)
            try self.validate(self.instanceType, name: "instanceType", parent: name, min: 1)
            try self.validate(self.instanceType, name: "instanceType", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.priority, name: "priority", parent: name, min: 0.0)
            try self.validate(self.weightedCapacity, name: "weightedCapacity", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case bidPrice = "BidPrice"
            case bidPriceAsPercentageOfOnDemandPrice = "BidPriceAsPercentageOfOnDemandPrice"
            case configurations = "Configurations"
            case customAmiId = "CustomAmiId"
            case ebsConfiguration = "EbsConfiguration"
            case instanceType = "InstanceType"
            case priority = "Priority"
            case weightedCapacity = "WeightedCapacity"
        }
    }

    public struct InstanceTypeSpecification: AWSDecodableShape {
        /// The bid price for each Amazon EC2 Spot Instance type as defined by InstanceType. Expressed in USD.
        public let bidPrice: String?
        /// The bid price, as a percentage of On-Demand price, for each Amazon EC2 Spot Instance as defined by InstanceType. Expressed as a number (for example, 20 specifies 20%).
        public let bidPriceAsPercentageOfOnDemandPrice: Double?
        /// A configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software bundled with Amazon EMR.
        public let configurations: [Configuration]?
        /// The custom AMI ID to use for the instance type.
        public let customAmiId: String?
        /// The configuration of Amazon Elastic Block Store (Amazon EBS) attached to each instance as defined by InstanceType.
        public let ebsBlockDevices: [EbsBlockDevice]?
        /// Evaluates to TRUE when the specified InstanceType is EBS-optimized.
        public let ebsOptimized: Bool?
        /// The Amazon EC2 instance type, for example m3.xlarge.
        public let instanceType: String?
        /// The priority at which Amazon EMR launches the Amazon EC2 instances with this instance type.  Priority starts at 0, which is the highest priority. Amazon EMR considers the highest priority first.
        public let priority: Double?
        /// The number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined in InstanceFleetConfig. Capacity values represent performance characteristics such as vCPUs, memory, or I/O. If not specified, the default value is 1.
        public let weightedCapacity: Int?

        @inlinable
        public init(bidPrice: String? = nil, bidPriceAsPercentageOfOnDemandPrice: Double? = nil, configurations: [Configuration]? = nil, customAmiId: String? = nil, ebsBlockDevices: [EbsBlockDevice]? = nil, ebsOptimized: Bool? = nil, instanceType: String? = nil, priority: Double? = nil, weightedCapacity: Int? = nil) {
            self.bidPrice = bidPrice
            self.bidPriceAsPercentageOfOnDemandPrice = bidPriceAsPercentageOfOnDemandPrice
            self.configurations = configurations
            self.customAmiId = customAmiId
            self.ebsBlockDevices = ebsBlockDevices
            self.ebsOptimized = ebsOptimized
            self.instanceType = instanceType
            self.priority = priority
            self.weightedCapacity = weightedCapacity
        }

        private enum CodingKeys: String, CodingKey {
            case bidPrice = "BidPrice"
            case bidPriceAsPercentageOfOnDemandPrice = "BidPriceAsPercentageOfOnDemandPrice"
            case configurations = "Configurations"
            case customAmiId = "CustomAmiId"
            case ebsBlockDevices = "EbsBlockDevices"
            case ebsOptimized = "EbsOptimized"
            case instanceType = "InstanceType"
            case priority = "Priority"
            case weightedCapacity = "WeightedCapacity"
        }
    }

    public struct InvalidRequestException: AWSErrorShape {
        /// The error code associated with the exception.
        public let errorCode: String?
        /// The message associated with the exception.
        public let message: String?

        @inlinable
        public init(errorCode: String? = nil, message: String? = nil) {
            self.errorCode = errorCode
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case errorCode = "ErrorCode"
            case message = "Message"
        }
    }

    public struct JobFlowDetail: AWSDecodableShape {
        /// Applies only to Amazon EMR AMI versions 3.x and 2.x. For Amazon EMR releases 4.0 and later, ReleaseLabel is used. To specify a custom AMI, use CustomAmiID.
        public let amiVersion: String?
        /// An IAM role for automatic scaling policies. The default role is EMR_AutoScaling_DefaultRole. The IAM role provides a way for the automatic scaling feature to get the required permissions it needs to launch and terminate Amazon EC2 instances in an instance group.
        public let autoScalingRole: String?
        /// A list of the bootstrap actions run by the job flow.
        public let bootstrapActions: [BootstrapActionDetail]?
        /// Describes the execution status of the job flow.
        public let executionStatusDetail: JobFlowExecutionStatusDetail?
        /// Describes the Amazon EC2 instances of the job flow.
        public let instances: JobFlowInstancesDetail?
        /// The job flow identifier.
        public let jobFlowId: String?
        /// The IAM role that was specified when the job flow was launched. The Amazon EC2 instances of the job flow assume this role.
        public let jobFlowRole: String?
        /// The KMS key used for encrypting log files. This attribute is only available with Amazon EMR 5.30.0 and later, excluding 6.0.0.
        public let logEncryptionKmsKeyId: String?
        /// The location in Amazon S3 where log files for the job are stored.
        public let logUri: String?
        /// The name of the job flow.
        public let name: String?
        /// The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized. TERMINATE_AT_INSTANCE_HOUR indicates that Amazon EMR terminates nodes at the instance-hour boundary, regardless of when the request to terminate the instance was submitted. This option is only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that version. TERMINATE_AT_TASK_COMPLETION indicates that Amazon EMR adds nodes to a deny list and drains tasks from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour boundary. With either behavior, Amazon EMR removes the least active nodes first and blocks instance termination if it could lead to HDFS corruption. TERMINATE_AT_TASK_COMPLETION available only in Amazon EMR releases 4.1.0 and later, and is the default for releases of Amazon EMR earlier than 5.1.0.
        public let scaleDownBehavior: ScaleDownBehavior?
        /// The IAM role that is assumed by the Amazon EMR service to access Amazon Web Services resources on your behalf.
        public let serviceRole: String?
        /// A list of steps run by the job flow.
        public let steps: [StepDetail]?
        /// A list of strings set by third-party software when the job flow is launched. If you are not using third-party software to manage the job flow, this value is empty.
        public let supportedProducts: [String]?
        /// Indicates whether the cluster is visible to IAM principals in the Amazon Web Services account associated with the cluster. When true, IAM principals in the Amazon Web Services account can perform Amazon EMR cluster actions that their IAM policies allow. When false, only the IAM principal that created the cluster and the Amazon Web Services account root user can perform Amazon EMR actions, regardless of IAM permissions policies attached to other IAM principals. The default value is true if a value is not provided when creating a cluster using the Amazon EMR API RunJobFlow command, the CLI create-cluster command, or the Amazon Web Services Management Console.
        public let visibleToAllUsers: Bool?

        @inlinable
        public init(amiVersion: String? = nil, autoScalingRole: String? = nil, bootstrapActions: [BootstrapActionDetail]? = nil, executionStatusDetail: JobFlowExecutionStatusDetail? = nil, instances: JobFlowInstancesDetail? = nil, jobFlowId: String? = nil, jobFlowRole: String? = nil, logEncryptionKmsKeyId: String? = nil, logUri: String? = nil, name: String? = nil, scaleDownBehavior: ScaleDownBehavior? = nil, serviceRole: String? = nil, steps: [StepDetail]? = nil, supportedProducts: [String]? = nil, visibleToAllUsers: Bool? = nil) {
            self.amiVersion = amiVersion
            self.autoScalingRole = autoScalingRole
            self.bootstrapActions = bootstrapActions
            self.executionStatusDetail = executionStatusDetail
            self.instances = instances
            self.jobFlowId = jobFlowId
            self.jobFlowRole = jobFlowRole
            self.logEncryptionKmsKeyId = logEncryptionKmsKeyId
            self.logUri = logUri
            self.name = name
            self.scaleDownBehavior = scaleDownBehavior
            self.serviceRole = serviceRole
            self.steps = steps
            self.supportedProducts = supportedProducts
            self.visibleToAllUsers = visibleToAllUsers
        }

        private enum CodingKeys: String, CodingKey {
            case amiVersion = "AmiVersion"
            case autoScalingRole = "AutoScalingRole"
            case bootstrapActions = "BootstrapActions"
            case executionStatusDetail = "ExecutionStatusDetail"
            case instances = "Instances"
            case jobFlowId = "JobFlowId"
            case jobFlowRole = "JobFlowRole"
            case logEncryptionKmsKeyId = "LogEncryptionKmsKeyId"
            case logUri = "LogUri"
            case name = "Name"
            case scaleDownBehavior = "ScaleDownBehavior"
            case serviceRole = "ServiceRole"
            case steps = "Steps"
            case supportedProducts = "SupportedProducts"
            case visibleToAllUsers = "VisibleToAllUsers"
        }
    }

    public struct JobFlowExecutionStatusDetail: AWSDecodableShape {
        /// The creation date and time of the job flow.
        public let creationDateTime: Date?
        /// The completion date and time of the job flow.
        public let endDateTime: Date?
        /// Description of the job flow last changed state.
        public let lastStateChangeReason: String?
        /// The date and time when the job flow was ready to start running bootstrap actions.
        public let readyDateTime: Date?
        /// The start date and time of the job flow.
        public let startDateTime: Date?
        /// The state of the job flow.
        public let state: JobFlowExecutionState?

        @inlinable
        public init(creationDateTime: Date? = nil, endDateTime: Date? = nil, lastStateChangeReason: String? = nil, readyDateTime: Date? = nil, startDateTime: Date? = nil, state: JobFlowExecutionState? = nil) {
            self.creationDateTime = creationDateTime
            self.endDateTime = endDateTime
            self.lastStateChangeReason = lastStateChangeReason
            self.readyDateTime = readyDateTime
            self.startDateTime = startDateTime
            self.state = state
        }

        private enum CodingKeys: String, CodingKey {
            case creationDateTime = "CreationDateTime"
            case endDateTime = "EndDateTime"
            case lastStateChangeReason = "LastStateChangeReason"
            case readyDateTime = "ReadyDateTime"
            case startDateTime = "StartDateTime"
            case state = "State"
        }
    }

    public struct JobFlowInstancesConfig: AWSEncodableShape {
        /// A list of additional Amazon EC2 security group IDs for the master node.
        public let additionalMasterSecurityGroups: [String]?
        /// A list of additional Amazon EC2 security group IDs for the core and task nodes.
        public let additionalSlaveSecurityGroups: [String]?
        /// The name of the Amazon EC2 key pair that can be used to connect to the master node using SSH as the user called "hadoop."
        public let ec2KeyName: String?
        /// Applies to clusters that use the uniform instance group configuration. To launch the cluster in Amazon Virtual Private Cloud (Amazon VPC), set this parameter to the identifier of the Amazon VPC subnet where you want the cluster to launch. If you do not specify this value and your account supports EC2-Classic, the cluster launches in EC2-Classic.
        public let ec2SubnetId: String?
        /// Applies to clusters that use the instance fleet configuration. When multiple Amazon EC2 subnet IDs are specified, Amazon EMR evaluates them and launches instances in the optimal subnet.  The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x versions.
        public let ec2SubnetIds: [String]?
        /// The identifier of the Amazon EC2 security group for the master node. If you specify EmrManagedMasterSecurityGroup, you must also specify EmrManagedSlaveSecurityGroup.
        public let emrManagedMasterSecurityGroup: String?
        /// The identifier of the Amazon EC2 security group for the core and task nodes. If you specify EmrManagedSlaveSecurityGroup, you must also specify EmrManagedMasterSecurityGroup.
        public let emrManagedSlaveSecurityGroup: String?
        /// Applies only to Amazon EMR release versions earlier than 4.0. The Hadoop version for the cluster. Valid inputs are "0.18" (no longer maintained), "0.20" (no longer maintained), "0.20.205" (no longer maintained), "1.0.3", "2.2.0", or "2.4.0". If you do not set this value, the default of 0.18 is used, unless the AmiVersion parameter is set in the RunJobFlow call, in which case the default version of Hadoop for that AMI version is used.
        public let hadoopVersion: String?
        /// The number of Amazon EC2 instances in the cluster.
        public let instanceCount: Int?
        ///  The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x versions.  Describes the Amazon EC2 instances and instance configurations for clusters that use the instance fleet configuration.
        public let instanceFleets: [InstanceFleetConfig]?
        /// Configuration for the instance groups in a cluster.
        public let instanceGroups: [InstanceGroupConfig]?
        /// Specifies whether the cluster should remain available after completing all steps. Defaults to false. For more information about configuring cluster termination, see Control Cluster Termination in the EMR Management Guide.
        public let keepJobFlowAliveWhenNoSteps: Bool?
        /// The Amazon EC2 instance type of the master node.
        public let masterInstanceType: String?
        /// The Availability Zone in which the cluster runs.
        public let placement: PlacementType?
        /// The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.
        public let serviceAccessSecurityGroup: String?
        /// The Amazon EC2 instance type of the core and task nodes.
        public let slaveInstanceType: String?
        /// Specifies whether to lock the cluster to prevent the Amazon EC2 instances from being terminated by API call, user intervention, or in the event of a job-flow error.
        public let terminationProtected: Bool?
        /// Indicates whether Amazon EMR should gracefully replace core nodes that have degraded within the cluster.
        public let unhealthyNodeReplacement: Bool?

        @inlinable
        public init(additionalMasterSecurityGroups: [String]? = nil, additionalSlaveSecurityGroups: [String]? = nil, ec2KeyName: String? = nil, ec2SubnetId: String? = nil, ec2SubnetIds: [String]? = nil, emrManagedMasterSecurityGroup: String? = nil, emrManagedSlaveSecurityGroup: String? = nil, hadoopVersion: String? = nil, instanceCount: Int? = nil, instanceFleets: [InstanceFleetConfig]? = nil, instanceGroups: [InstanceGroupConfig]? = nil, keepJobFlowAliveWhenNoSteps: Bool? = nil, masterInstanceType: String? = nil, placement: PlacementType? = nil, serviceAccessSecurityGroup: String? = nil, slaveInstanceType: String? = nil, terminationProtected: Bool? = nil, unhealthyNodeReplacement: Bool? = nil) {
            self.additionalMasterSecurityGroups = additionalMasterSecurityGroups
            self.additionalSlaveSecurityGroups = additionalSlaveSecurityGroups
            self.ec2KeyName = ec2KeyName
            self.ec2SubnetId = ec2SubnetId
            self.ec2SubnetIds = ec2SubnetIds
            self.emrManagedMasterSecurityGroup = emrManagedMasterSecurityGroup
            self.emrManagedSlaveSecurityGroup = emrManagedSlaveSecurityGroup
            self.hadoopVersion = hadoopVersion
            self.instanceCount = instanceCount
            self.instanceFleets = instanceFleets
            self.instanceGroups = instanceGroups
            self.keepJobFlowAliveWhenNoSteps = keepJobFlowAliveWhenNoSteps
            self.masterInstanceType = masterInstanceType
            self.placement = placement
            self.serviceAccessSecurityGroup = serviceAccessSecurityGroup
            self.slaveInstanceType = slaveInstanceType
            self.terminationProtected = terminationProtected
            self.unhealthyNodeReplacement = unhealthyNodeReplacement
        }

        public func validate(name: String) throws {
            try self.additionalMasterSecurityGroups?.forEach {
                try validate($0, name: "additionalMasterSecurityGroups[]", parent: name, max: 256)
                try validate($0, name: "additionalMasterSecurityGroups[]", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            }
            try self.additionalSlaveSecurityGroups?.forEach {
                try validate($0, name: "additionalSlaveSecurityGroups[]", parent: name, max: 256)
                try validate($0, name: "additionalSlaveSecurityGroups[]", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            }
            try self.validate(self.ec2KeyName, name: "ec2KeyName", parent: name, max: 256)
            try self.validate(self.ec2KeyName, name: "ec2KeyName", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.ec2SubnetId, name: "ec2SubnetId", parent: name, max: 256)
            try self.validate(self.ec2SubnetId, name: "ec2SubnetId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.ec2SubnetIds?.forEach {
                try validate($0, name: "ec2SubnetIds[]", parent: name, max: 256)
                try validate($0, name: "ec2SubnetIds[]", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            }
            try self.validate(self.emrManagedMasterSecurityGroup, name: "emrManagedMasterSecurityGroup", parent: name, max: 256)
            try self.validate(self.emrManagedMasterSecurityGroup, name: "emrManagedMasterSecurityGroup", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.emrManagedSlaveSecurityGroup, name: "emrManagedSlaveSecurityGroup", parent: name, max: 256)
            try self.validate(self.emrManagedSlaveSecurityGroup, name: "emrManagedSlaveSecurityGroup", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.hadoopVersion, name: "hadoopVersion", parent: name, max: 256)
            try self.validate(self.hadoopVersion, name: "hadoopVersion", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.instanceFleets?.forEach {
                try $0.validate(name: "\(name).instanceFleets[]")
            }
            try self.instanceGroups?.forEach {
                try $0.validate(name: "\(name).instanceGroups[]")
            }
            try self.validate(self.masterInstanceType, name: "masterInstanceType", parent: name, max: 256)
            try self.validate(self.masterInstanceType, name: "masterInstanceType", parent: name, min: 1)
            try self.validate(self.masterInstanceType, name: "masterInstanceType", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.placement?.validate(name: "\(name).placement")
            try self.validate(self.serviceAccessSecurityGroup, name: "serviceAccessSecurityGroup", parent: name, max: 256)
            try self.validate(self.serviceAccessSecurityGroup, name: "serviceAccessSecurityGroup", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.slaveInstanceType, name: "slaveInstanceType", parent: name, max: 256)
            try self.validate(self.slaveInstanceType, name: "slaveInstanceType", parent: name, min: 1)
            try self.validate(self.slaveInstanceType, name: "slaveInstanceType", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case additionalMasterSecurityGroups = "AdditionalMasterSecurityGroups"
            case additionalSlaveSecurityGroups = "AdditionalSlaveSecurityGroups"
            case ec2KeyName = "Ec2KeyName"
            case ec2SubnetId = "Ec2SubnetId"
            case ec2SubnetIds = "Ec2SubnetIds"
            case emrManagedMasterSecurityGroup = "EmrManagedMasterSecurityGroup"
            case emrManagedSlaveSecurityGroup = "EmrManagedSlaveSecurityGroup"
            case hadoopVersion = "HadoopVersion"
            case instanceCount = "InstanceCount"
            case instanceFleets = "InstanceFleets"
            case instanceGroups = "InstanceGroups"
            case keepJobFlowAliveWhenNoSteps = "KeepJobFlowAliveWhenNoSteps"
            case masterInstanceType = "MasterInstanceType"
            case placement = "Placement"
            case serviceAccessSecurityGroup = "ServiceAccessSecurityGroup"
            case slaveInstanceType = "SlaveInstanceType"
            case terminationProtected = "TerminationProtected"
            case unhealthyNodeReplacement = "UnhealthyNodeReplacement"
        }
    }

    public struct JobFlowInstancesDetail: AWSDecodableShape {
        /// The name of an Amazon EC2 key pair that can be used to connect to the master node using SSH.
        public let ec2KeyName: String?
        /// For clusters launched within Amazon Virtual Private Cloud, this is the identifier of the subnet where the cluster was launched.
        public let ec2SubnetId: String?
        /// The Hadoop version for the cluster.
        public let hadoopVersion: String?
        /// The number of Amazon EC2 instances in the cluster. If the value is 1, the same instance serves as both the master and core and task node. If the value is greater than 1, one instance is the master node and all others are core and task nodes.
        public let instanceCount: Int?
        /// Details about the instance groups in a cluster.
        public let instanceGroups: [InstanceGroupDetail]?
        /// Specifies whether the cluster should remain available after completing all steps.
        public let keepJobFlowAliveWhenNoSteps: Bool?
        /// The Amazon EC2 instance identifier of the master node.
        public let masterInstanceId: String?
        /// The Amazon EC2 master node instance type.
        public let masterInstanceType: String?
        /// The DNS name of the master node. If the cluster is on a private subnet, this is the private DNS name. On a public subnet, this is the public DNS name.
        public let masterPublicDnsName: String?
        /// An approximation of the cost of the cluster, represented in m1.small/hours. This value is increased one time for every hour that an m1.small instance runs. Larger instances are weighted more heavily, so an Amazon EC2 instance that is roughly four times more expensive would result in the normalized instance hours being increased incrementally four times. This result is only an approximation and does not reflect the actual billing rate.
        public let normalizedInstanceHours: Int?
        /// The Amazon EC2 Availability Zone for the cluster.
        public let placement: PlacementType?
        /// The Amazon EC2 core and task node instance type.
        public let slaveInstanceType: String?
        /// Specifies whether the Amazon EC2 instances in the cluster are protected from termination by API calls, user intervention, or in the event of a job-flow error.
        public let terminationProtected: Bool?
        /// Indicates whether Amazon EMR should gracefully replace core nodes that have degraded within the cluster.
        public let unhealthyNodeReplacement: Bool?

        @inlinable
        public init(ec2KeyName: String? = nil, ec2SubnetId: String? = nil, hadoopVersion: String? = nil, instanceCount: Int? = nil, instanceGroups: [InstanceGroupDetail]? = nil, keepJobFlowAliveWhenNoSteps: Bool? = nil, masterInstanceId: String? = nil, masterInstanceType: String? = nil, masterPublicDnsName: String? = nil, normalizedInstanceHours: Int? = nil, placement: PlacementType? = nil, slaveInstanceType: String? = nil, terminationProtected: Bool? = nil, unhealthyNodeReplacement: Bool? = nil) {
            self.ec2KeyName = ec2KeyName
            self.ec2SubnetId = ec2SubnetId
            self.hadoopVersion = hadoopVersion
            self.instanceCount = instanceCount
            self.instanceGroups = instanceGroups
            self.keepJobFlowAliveWhenNoSteps = keepJobFlowAliveWhenNoSteps
            self.masterInstanceId = masterInstanceId
            self.masterInstanceType = masterInstanceType
            self.masterPublicDnsName = masterPublicDnsName
            self.normalizedInstanceHours = normalizedInstanceHours
            self.placement = placement
            self.slaveInstanceType = slaveInstanceType
            self.terminationProtected = terminationProtected
            self.unhealthyNodeReplacement = unhealthyNodeReplacement
        }

        private enum CodingKeys: String, CodingKey {
            case ec2KeyName = "Ec2KeyName"
            case ec2SubnetId = "Ec2SubnetId"
            case hadoopVersion = "HadoopVersion"
            case instanceCount = "InstanceCount"
            case instanceGroups = "InstanceGroups"
            case keepJobFlowAliveWhenNoSteps = "KeepJobFlowAliveWhenNoSteps"
            case masterInstanceId = "MasterInstanceId"
            case masterInstanceType = "MasterInstanceType"
            case masterPublicDnsName = "MasterPublicDnsName"
            case normalizedInstanceHours = "NormalizedInstanceHours"
            case placement = "Placement"
            case slaveInstanceType = "SlaveInstanceType"
            case terminationProtected = "TerminationProtected"
            case unhealthyNodeReplacement = "UnhealthyNodeReplacement"
        }
    }

    public struct KerberosAttributes: AWSEncodableShape & AWSDecodableShape {
        /// The Active Directory password for ADDomainJoinUser.
        public let adDomainJoinPassword: String?
        /// Required only when establishing a cross-realm trust with an Active Directory domain. A user with sufficient privileges to join resources to the domain.
        public let adDomainJoinUser: String?
        /// Required only when establishing a cross-realm trust with a KDC in a different realm. The cross-realm principal password, which must be identical across realms.
        public let crossRealmTrustPrincipalPassword: String?
        /// The password used within the cluster for the kadmin service on the cluster-dedicated KDC, which maintains Kerberos principals, password policies, and keytabs for the cluster.
        public let kdcAdminPassword: String?
        /// The name of the Kerberos realm to which all nodes in a cluster belong. For example, EC2.INTERNAL.
        public let realm: String?

        @inlinable
        public init(adDomainJoinPassword: String? = nil, adDomainJoinUser: String? = nil, crossRealmTrustPrincipalPassword: String? = nil, kdcAdminPassword: String? = nil, realm: String? = nil) {
            self.adDomainJoinPassword = adDomainJoinPassword
            self.adDomainJoinUser = adDomainJoinUser
            self.crossRealmTrustPrincipalPassword = crossRealmTrustPrincipalPassword
            self.kdcAdminPassword = kdcAdminPassword
            self.realm = realm
        }

        public func validate(name: String) throws {
            try self.validate(self.adDomainJoinPassword, name: "adDomainJoinPassword", parent: name, max: 256)
            try self.validate(self.adDomainJoinPassword, name: "adDomainJoinPassword", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.adDomainJoinUser, name: "adDomainJoinUser", parent: name, max: 256)
            try self.validate(self.adDomainJoinUser, name: "adDomainJoinUser", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.crossRealmTrustPrincipalPassword, name: "crossRealmTrustPrincipalPassword", parent: name, max: 256)
            try self.validate(self.crossRealmTrustPrincipalPassword, name: "crossRealmTrustPrincipalPassword", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.kdcAdminPassword, name: "kdcAdminPassword", parent: name, max: 256)
            try self.validate(self.kdcAdminPassword, name: "kdcAdminPassword", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.realm, name: "realm", parent: name, max: 256)
            try self.validate(self.realm, name: "realm", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case adDomainJoinPassword = "ADDomainJoinPassword"
            case adDomainJoinUser = "ADDomainJoinUser"
            case crossRealmTrustPrincipalPassword = "CrossRealmTrustPrincipalPassword"
            case kdcAdminPassword = "KdcAdminPassword"
            case realm = "Realm"
        }
    }

    public struct KeyValue: AWSEncodableShape & AWSDecodableShape {
        /// The unique identifier of a key-value pair.
        public let key: String?
        /// The value part of the identified key.
        public let value: String?

        @inlinable
        public init(key: String? = nil, value: String? = nil) {
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 10280)
            try self.validate(self.key, name: "key", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.value, name: "value", parent: name, max: 10280)
            try self.validate(self.value, name: "value", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case value = "Value"
        }
    }

    public struct ListBootstrapActionsInput: AWSEncodableShape {
        /// The cluster identifier for the bootstrap actions to list.
        public let clusterId: String?
        /// The pagination token that indicates the next set of results to retrieve.
        public let marker: String?

        @inlinable
        public init(clusterId: String? = nil, marker: String? = nil) {
            self.clusterId = clusterId
            self.marker = marker
        }

        private enum CodingKeys: String, CodingKey {
            case clusterId = "ClusterId"
            case marker = "Marker"
        }
    }

    public struct ListBootstrapActionsOutput: AWSDecodableShape {
        /// The bootstrap actions associated with the cluster.
        public let bootstrapActions: [Command]?
        /// The pagination token that indicates the next set of results to retrieve.
        public let marker: String?

        @inlinable
        public init(bootstrapActions: [Command]? = nil, marker: String? = nil) {
            self.bootstrapActions = bootstrapActions
            self.marker = marker
        }

        private enum CodingKeys: String, CodingKey {
            case bootstrapActions = "BootstrapActions"
            case marker = "Marker"
        }
    }

    public struct ListClustersInput: AWSEncodableShape {
        /// The cluster state filters to apply when listing clusters. Clusters that change state while this action runs may be not be returned as expected in the list of clusters.
        public let clusterStates: [ClusterState]?
        /// The creation date and time beginning value filter for listing clusters.
        public let createdAfter: Date?
        /// The creation date and time end value filter for listing clusters.
        public let createdBefore: Date?
        /// The pagination token that indicates the next set of results to retrieve.
        public let marker: String?

        @inlinable
        public init(clusterStates: [ClusterState]? = nil, createdAfter: Date? = nil, createdBefore: Date? = nil, marker: String? = nil) {
            self.clusterStates = clusterStates
            self.createdAfter = createdAfter
            self.createdBefore = createdBefore
            self.marker = marker
        }

        private enum CodingKeys: String, CodingKey {
            case clusterStates = "ClusterStates"
            case createdAfter = "CreatedAfter"
            case createdBefore = "CreatedBefore"
            case marker = "Marker"
        }
    }

    public struct ListClustersOutput: AWSDecodableShape {
        /// The list of clusters for the account based on the given filters.
        public let clusters: [ClusterSummary]?
        /// The pagination token that indicates the next set of results to retrieve.
        public let marker: String?

        @inlinable
        public init(clusters: [ClusterSummary]? = nil, marker: String? = nil) {
            self.clusters = clusters
            self.marker = marker
        }

        private enum CodingKeys: String, CodingKey {
            case clusters = "Clusters"
            case marker = "Marker"
        }
    }

    public struct ListInstanceFleetsInput: AWSEncodableShape {
        /// The unique identifier of the cluster.
        public let clusterId: String?
        /// The pagination token that indicates the next set of results to retrieve.
        public let marker: String?

        @inlinable
        public init(clusterId: String? = nil, marker: String? = nil) {
            self.clusterId = clusterId
            self.marker = marker
        }

        private enum CodingKeys: String, CodingKey {
            case clusterId = "ClusterId"
            case marker = "Marker"
        }
    }

    public struct ListInstanceFleetsOutput: AWSDecodableShape {
        /// The list of instance fleets for the cluster and given filters.
        public let instanceFleets: [InstanceFleet]?
        /// The pagination token that indicates the next set of results to retrieve.
        public let marker: String?

        @inlinable
        public init(instanceFleets: [InstanceFleet]? = nil, marker: String? = nil) {
            self.instanceFleets = instanceFleets
            self.marker = marker
        }

        private enum CodingKeys: String, CodingKey {
            case instanceFleets = "InstanceFleets"
            case marker = "Marker"
        }
    }

    public struct ListInstanceGroupsInput: AWSEncodableShape {
        /// The identifier of the cluster for which to list the instance groups.
        public let clusterId: String?
        /// The pagination token that indicates the next set of results to retrieve.
        public let marker: String?

        @inlinable
        public init(clusterId: String? = nil, marker: String? = nil) {
            self.clusterId = clusterId
            self.marker = marker
        }

        private enum CodingKeys: String, CodingKey {
            case clusterId = "ClusterId"
            case marker = "Marker"
        }
    }

    public struct ListInstanceGroupsOutput: AWSDecodableShape {
        /// The list of instance groups for the cluster and given filters.
        public let instanceGroups: [InstanceGroup]?
        /// The pagination token that indicates the next set of results to retrieve.
        public let marker: String?

        @inlinable
        public init(instanceGroups: [InstanceGroup]? = nil, marker: String? = nil) {
            self.instanceGroups = instanceGroups
            self.marker = marker
        }

        private enum CodingKeys: String, CodingKey {
            case instanceGroups = "InstanceGroups"
            case marker = "Marker"
        }
    }

    public struct ListInstancesInput: AWSEncodableShape {
        /// The identifier of the cluster for which to list the instances.
        public let clusterId: String?
        /// The unique identifier of the instance fleet.
        public let instanceFleetId: String?
        /// The node type of the instance fleet. For example MASTER, CORE, or TASK.
        public let instanceFleetType: InstanceFleetType?
        /// The identifier of the instance group for which to list the instances.
        public let instanceGroupId: String?
        /// The type of instance group for which to list the instances.
        public let instanceGroupTypes: [InstanceGroupType]?
        /// A list of instance states that will filter the instances returned with this request.
        public let instanceStates: [InstanceState]?
        /// The pagination token that indicates the next set of results to retrieve.
        public let marker: String?

        @inlinable
        public init(clusterId: String? = nil, instanceFleetId: String? = nil, instanceFleetType: InstanceFleetType? = nil, instanceGroupId: String? = nil, instanceGroupTypes: [InstanceGroupType]? = nil, instanceStates: [InstanceState]? = nil, marker: String? = nil) {
            self.clusterId = clusterId
            self.instanceFleetId = instanceFleetId
            self.instanceFleetType = instanceFleetType
            self.instanceGroupId = instanceGroupId
            self.instanceGroupTypes = instanceGroupTypes
            self.instanceStates = instanceStates
            self.marker = marker
        }

        private enum CodingKeys: String, CodingKey {
            case clusterId = "ClusterId"
            case instanceFleetId = "InstanceFleetId"
            case instanceFleetType = "InstanceFleetType"
            case instanceGroupId = "InstanceGroupId"
            case instanceGroupTypes = "InstanceGroupTypes"
            case instanceStates = "InstanceStates"
            case marker = "Marker"
        }
    }

    public struct ListInstancesOutput: AWSDecodableShape {
        /// The list of instances for the cluster and given filters.
        public let instances: [Instance]?
        /// The pagination token that indicates the next set of results to retrieve.
        public let marker: String?

        @inlinable
        public init(instances: [Instance]? = nil, marker: String? = nil) {
            self.instances = instances
            self.marker = marker
        }

        private enum CodingKeys: String, CodingKey {
            case instances = "Instances"
            case marker = "Marker"
        }
    }

    public struct ListNotebookExecutionsInput: AWSEncodableShape {
        /// The unique ID of the editor associated with the notebook execution.
        public let editorId: String?
        /// The unique ID of the execution engine.
        public let executionEngineId: String?
        /// The beginning of time range filter for listing notebook executions. The default is the timestamp of 30 days ago.
        public let from: Date?
        /// The pagination token, returned by a previous ListNotebookExecutions call, that indicates the start of the list for this ListNotebookExecutions call.
        public let marker: String?
        /// The status filter for listing notebook executions.    START_PENDING indicates that the cluster has received the execution request but execution has not begun.    STARTING indicates that the execution is starting on the cluster.    RUNNING indicates that the execution is being processed by the cluster.    FINISHING indicates that execution processing is in the final stages.    FINISHED indicates that the execution has completed without error.    FAILING indicates that the execution is failing and will not finish successfully.    FAILED indicates that the execution failed.    STOP_PENDING indicates that the cluster has received a StopNotebookExecution request and the stop is pending.    STOPPING indicates that the cluster is in the process of stopping the execution as a result of a StopNotebookExecution request.    STOPPED indicates that the execution stopped because of a StopNotebookExecution request.
        public let status: NotebookExecutionStatus?
        /// The end of time range filter for listing notebook executions. The default is the current timestamp.
        public let to: Date?

        @inlinable
        public init(editorId: String? = nil, executionEngineId: String? = nil, from: Date? = nil, marker: String? = nil, status: NotebookExecutionStatus? = nil, to: Date? = nil) {
            self.editorId = editorId
            self.executionEngineId = executionEngineId
            self.from = from
            self.marker = marker
            self.status = status
            self.to = to
        }

        public func validate(name: String) throws {
            try self.validate(self.editorId, name: "editorId", parent: name, max: 256)
            try self.validate(self.editorId, name: "editorId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.executionEngineId, name: "executionEngineId", parent: name, max: 10280)
            try self.validate(self.executionEngineId, name: "executionEngineId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case editorId = "EditorId"
            case executionEngineId = "ExecutionEngineId"
            case from = "From"
            case marker = "Marker"
            case status = "Status"
            case to = "To"
        }
    }

    public struct ListNotebookExecutionsOutput: AWSDecodableShape {
        /// A pagination token that a subsequent ListNotebookExecutions can use to determine the next set of results to retrieve.
        public let marker: String?
        /// A list of notebook executions.
        public let notebookExecutions: [NotebookExecutionSummary]?

        @inlinable
        public init(marker: String? = nil, notebookExecutions: [NotebookExecutionSummary]? = nil) {
            self.marker = marker
            self.notebookExecutions = notebookExecutions
        }

        private enum CodingKeys: String, CodingKey {
            case marker = "Marker"
            case notebookExecutions = "NotebookExecutions"
        }
    }

    public struct ListReleaseLabelsInput: AWSEncodableShape {
        /// Filters the results of the request. Prefix specifies the prefix of release labels to return. Application specifies the application (with/without version) of release labels to return.
        public let filters: ReleaseLabelFilter?
        /// Defines the maximum number of release labels to return in a single response. The default is 100.
        public let maxResults: Int?
        /// Specifies the next page of results. If NextToken is not specified, which is usually the case for the first request of ListReleaseLabels, the first page of results are determined by other filtering parameters or by the latest version. The ListReleaseLabels request fails if the identity (Amazon Web Services account ID) and all filtering parameters are different from the original request, or if the NextToken is expired or tampered with.
        public let nextToken: String?

        @inlinable
        public init(filters: ReleaseLabelFilter? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filters = filters
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filters = "Filters"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListReleaseLabelsOutput: AWSDecodableShape {
        /// Used to paginate the next page of results if specified in the next ListReleaseLabels request.
        public let nextToken: String?
        /// The returned release labels.
        public let releaseLabels: [String]?

        @inlinable
        public init(nextToken: String? = nil, releaseLabels: [String]? = nil) {
            self.nextToken = nextToken
            self.releaseLabels = releaseLabels
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case releaseLabels = "ReleaseLabels"
        }
    }

    public struct ListSecurityConfigurationsInput: AWSEncodableShape {
        /// The pagination token that indicates the set of results to retrieve.
        public let marker: String?

        @inlinable
        public init(marker: String? = nil) {
            self.marker = marker
        }

        private enum CodingKeys: String, CodingKey {
            case marker = "Marker"
        }
    }

    public struct ListSecurityConfigurationsOutput: AWSDecodableShape {
        /// A pagination token that indicates the next set of results to retrieve. Include the marker in the next ListSecurityConfiguration call to retrieve the next page of results, if required.
        public let marker: String?
        /// The creation date and time, and name, of each security configuration.
        public let securityConfigurations: [SecurityConfigurationSummary]?

        @inlinable
        public init(marker: String? = nil, securityConfigurations: [SecurityConfigurationSummary]? = nil) {
            self.marker = marker
            self.securityConfigurations = securityConfigurations
        }

        private enum CodingKeys: String, CodingKey {
            case marker = "Marker"
            case securityConfigurations = "SecurityConfigurations"
        }
    }

    public struct ListStepsInput: AWSEncodableShape {
        /// The identifier of the cluster for which to list the steps.
        public let clusterId: String?
        /// The maximum number of steps that a single ListSteps action returns is 50. To return a longer list of steps, use multiple ListSteps actions along with the Marker parameter, which is a pagination token that indicates the next set of results to retrieve.
        public let marker: String?
        /// The filter to limit the step list based on the identifier of the steps. You can specify a maximum of ten Step IDs. The character constraint applies to the overall length of the array.
        public let stepIds: [String]?
        /// The filter to limit the step list based on certain states.
        public let stepStates: [StepState]?

        @inlinable
        public init(clusterId: String? = nil, marker: String? = nil, stepIds: [String]? = nil, stepStates: [StepState]? = nil) {
            self.clusterId = clusterId
            self.marker = marker
            self.stepIds = stepIds
            self.stepStates = stepStates
        }

        public func validate(name: String) throws {
            try self.stepIds?.forEach {
                try validate($0, name: "stepIds[]", parent: name, max: 10280)
                try validate($0, name: "stepIds[]", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case clusterId = "ClusterId"
            case marker = "Marker"
            case stepIds = "StepIds"
            case stepStates = "StepStates"
        }
    }

    public struct ListStepsOutput: AWSDecodableShape {
        /// The maximum number of steps that a single ListSteps action returns is 50. To return a longer list of steps, use multiple ListSteps actions along with the Marker parameter, which is a pagination token that indicates the next set of results to retrieve.
        public let marker: String?
        /// The filtered list of steps for the cluster.
        public let steps: [StepSummary]?

        @inlinable
        public init(marker: String? = nil, steps: [StepSummary]? = nil) {
            self.marker = marker
            self.steps = steps
        }

        private enum CodingKeys: String, CodingKey {
            case marker = "Marker"
            case steps = "Steps"
        }
    }

    public struct ListStudioSessionMappingsInput: AWSEncodableShape {
        /// Specifies whether to return session mappings for users or groups. If not specified, the results include session mapping details for both users and groups.
        public let identityType: IdentityType?
        /// The pagination token that indicates the set of results to retrieve.
        public let marker: String?
        /// The ID of the Amazon EMR Studio.
        public let studioId: String?

        @inlinable
        public init(identityType: IdentityType? = nil, marker: String? = nil, studioId: String? = nil) {
            self.identityType = identityType
            self.marker = marker
            self.studioId = studioId
        }

        public func validate(name: String) throws {
            try self.validate(self.studioId, name: "studioId", parent: name, max: 256)
            try self.validate(self.studioId, name: "studioId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case identityType = "IdentityType"
            case marker = "Marker"
            case studioId = "StudioId"
        }
    }

    public struct ListStudioSessionMappingsOutput: AWSDecodableShape {
        /// The pagination token that indicates the next set of results to retrieve.
        public let marker: String?
        /// A list of session mapping summary objects. Each object includes session mapping details such as creation time, identity type (user or group), and Amazon EMR Studio ID.
        public let sessionMappings: [SessionMappingSummary]?

        @inlinable
        public init(marker: String? = nil, sessionMappings: [SessionMappingSummary]? = nil) {
            self.marker = marker
            self.sessionMappings = sessionMappings
        }

        private enum CodingKeys: String, CodingKey {
            case marker = "Marker"
            case sessionMappings = "SessionMappings"
        }
    }

    public struct ListStudiosInput: AWSEncodableShape {
        /// The pagination token that indicates the set of results to retrieve.
        public let marker: String?

        @inlinable
        public init(marker: String? = nil) {
            self.marker = marker
        }

        private enum CodingKeys: String, CodingKey {
            case marker = "Marker"
        }
    }

    public struct ListStudiosOutput: AWSDecodableShape {
        /// The pagination token that indicates the next set of results to retrieve.
        public let marker: String?
        /// The list of Studio summary objects.
        public let studios: [StudioSummary]?

        @inlinable
        public init(marker: String? = nil, studios: [StudioSummary]? = nil) {
            self.marker = marker
            self.studios = studios
        }

        private enum CodingKeys: String, CodingKey {
            case marker = "Marker"
            case studios = "Studios"
        }
    }

    public struct ListSupportedInstanceTypesInput: AWSEncodableShape {
        /// The pagination token that marks the next set of results to retrieve.
        public let marker: String?
        /// The Amazon EMR release label determines the versions of open-source application packages that Amazon EMR has installed on the cluster. Release labels are in the format emr-x.x.x, where x.x.x is an Amazon EMR release number such as emr-6.10.0. For more information about Amazon EMR releases and their included application versions and features, see the  Amazon EMR Release Guide .
        public let releaseLabel: String?

        @inlinable
        public init(marker: String? = nil, releaseLabel: String? = nil) {
            self.marker = marker
            self.releaseLabel = releaseLabel
        }

        private enum CodingKeys: String, CodingKey {
            case marker = "Marker"
            case releaseLabel = "ReleaseLabel"
        }
    }

    public struct ListSupportedInstanceTypesOutput: AWSDecodableShape {
        /// The pagination token that marks the next set of results to retrieve.
        public let marker: String?
        /// The list of instance types that the release specified in ListSupportedInstanceTypesInput$ReleaseLabel supports, filtered by Amazon Web Services Region.
        public let supportedInstanceTypes: [SupportedInstanceType]?

        @inlinable
        public init(marker: String? = nil, supportedInstanceTypes: [SupportedInstanceType]? = nil) {
            self.marker = marker
            self.supportedInstanceTypes = supportedInstanceTypes
        }

        private enum CodingKeys: String, CodingKey {
            case marker = "Marker"
            case supportedInstanceTypes = "SupportedInstanceTypes"
        }
    }

    public struct ManagedScalingPolicy: AWSEncodableShape & AWSDecodableShape {
        /// The Amazon EC2 unit limits for a managed scaling policy. The managed scaling activity of a cluster is not allowed to go above or below these limits. The limit only applies to the core and task nodes. The master node cannot be scaled after initial configuration.
        public let computeLimits: ComputeLimits?
        /// Determines whether a custom scaling utilization performance index can be set. Possible values include ADVANCED or DEFAULT.
        public let scalingStrategy: ScalingStrategy?
        /// An integer value that represents an advanced scaling strategy. Setting a higher value optimizes for performance. Setting a lower value optimizes for resource conservation. Setting the value  to 50 balances performance and resource conservation. Possible values are 1, 25, 50, 75, and 100.
        public let utilizationPerformanceIndex: Int?

        @inlinable
        public init(computeLimits: ComputeLimits? = nil, scalingStrategy: ScalingStrategy? = nil, utilizationPerformanceIndex: Int? = nil) {
            self.computeLimits = computeLimits
            self.scalingStrategy = scalingStrategy
            self.utilizationPerformanceIndex = utilizationPerformanceIndex
        }

        public func validate(name: String) throws {
            try self.validate(self.utilizationPerformanceIndex, name: "utilizationPerformanceIndex", parent: name, max: 100)
            try self.validate(self.utilizationPerformanceIndex, name: "utilizationPerformanceIndex", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case computeLimits = "ComputeLimits"
            case scalingStrategy = "ScalingStrategy"
            case utilizationPerformanceIndex = "UtilizationPerformanceIndex"
        }
    }

    public struct MetricDimension: AWSEncodableShape & AWSDecodableShape {
        /// The dimension name.
        public let key: String?
        /// The dimension value.
        public let value: String?

        @inlinable
        public init(key: String? = nil, value: String? = nil) {
            self.key = key
            self.value = value
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case value = "Value"
        }
    }

    public struct ModifyClusterInput: AWSEncodableShape {
        /// The unique identifier of the cluster.
        public let clusterId: String?
        /// Reserved.
        public let extendedSupport: Bool?
        /// The number of steps that can be executed concurrently. You can specify a minimum of 1 step and a maximum of 256 steps. We recommend that you do not change this parameter while steps are running or the ActionOnFailure setting may not behave as expected. For more information see Step$ActionOnFailure.
        public let stepConcurrencyLevel: Int?

        @inlinable
        public init(clusterId: String? = nil, extendedSupport: Bool? = nil, stepConcurrencyLevel: Int? = nil) {
            self.clusterId = clusterId
            self.extendedSupport = extendedSupport
            self.stepConcurrencyLevel = stepConcurrencyLevel
        }

        private enum CodingKeys: String, CodingKey {
            case clusterId = "ClusterId"
            case extendedSupport = "ExtendedSupport"
            case stepConcurrencyLevel = "StepConcurrencyLevel"
        }
    }

    public struct ModifyClusterOutput: AWSDecodableShape {
        /// Reserved.
        public let extendedSupport: Bool?
        /// The number of steps that can be executed concurrently.
        public let stepConcurrencyLevel: Int?

        @inlinable
        public init(extendedSupport: Bool? = nil, stepConcurrencyLevel: Int? = nil) {
            self.extendedSupport = extendedSupport
            self.stepConcurrencyLevel = stepConcurrencyLevel
        }

        private enum CodingKeys: String, CodingKey {
            case extendedSupport = "ExtendedSupport"
            case stepConcurrencyLevel = "StepConcurrencyLevel"
        }
    }

    public struct ModifyInstanceFleetInput: AWSEncodableShape {
        /// The unique identifier of the cluster.
        public let clusterId: String?
        /// The configuration parameters of the instance fleet.
        public let instanceFleet: InstanceFleetModifyConfig?

        @inlinable
        public init(clusterId: String? = nil, instanceFleet: InstanceFleetModifyConfig? = nil) {
            self.clusterId = clusterId
            self.instanceFleet = instanceFleet
        }

        public func validate(name: String) throws {
            try self.instanceFleet?.validate(name: "\(name).instanceFleet")
        }

        private enum CodingKeys: String, CodingKey {
            case clusterId = "ClusterId"
            case instanceFleet = "InstanceFleet"
        }
    }

    public struct ModifyInstanceGroupsInput: AWSEncodableShape {
        /// The ID of the cluster to which the instance group belongs.
        public let clusterId: String?
        /// Instance groups to change.
        public let instanceGroups: [InstanceGroupModifyConfig]?

        @inlinable
        public init(clusterId: String? = nil, instanceGroups: [InstanceGroupModifyConfig]? = nil) {
            self.clusterId = clusterId
            self.instanceGroups = instanceGroups
        }

        public func validate(name: String) throws {
            try self.instanceGroups?.forEach {
                try $0.validate(name: "\(name).instanceGroups[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case clusterId = "ClusterId"
            case instanceGroups = "InstanceGroups"
        }
    }

    public struct NotebookExecution: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the notebook execution.
        public let arn: String?
        /// The unique identifier of the Amazon EMR Notebook that is used for the notebook execution.
        public let editorId: String?
        /// The timestamp when notebook execution ended.
        public let endTime: Date?
        /// The environment variables associated with the notebook execution.
        public let environmentVariables: [String: String]?
        /// The execution engine, such as an Amazon EMR cluster, used to run the Amazon EMR notebook and perform the notebook execution.
        public let executionEngine: ExecutionEngineConfig?
        /// The reason for the latest status change of the notebook execution.
        public let lastStateChangeReason: String?
        /// The unique identifier of a notebook execution.
        public let notebookExecutionId: String?
        /// A name for the notebook execution.
        public let notebookExecutionName: String?
        /// The unique identifier of the Amazon EC2 security group associated with the Amazon EMR Notebook instance. For more information see Specifying Amazon EC2 Security Groups for Amazon EMR Notebooks in the Amazon EMR Management Guide.
        public let notebookInstanceSecurityGroupId: String?
        /// Input parameters in JSON format passed to the Amazon EMR Notebook at runtime for execution.
        public let notebookParams: String?
        /// The Amazon S3 location that stores the notebook execution input.
        public let notebookS3Location: NotebookS3LocationForOutput?
        /// The output format for the notebook execution.
        public let outputNotebookFormat: OutputNotebookFormat?
        /// The Amazon S3 location for the notebook execution output.
        public let outputNotebookS3Location: OutputNotebookS3LocationForOutput?
        /// The location of the notebook execution's output file in Amazon S3.
        public let outputNotebookURI: String?
        /// The timestamp when notebook execution started.
        public let startTime: Date?
        /// The status of the notebook execution.    START_PENDING indicates that the cluster has received the execution request but execution has not begun.    STARTING indicates that the execution is starting on the cluster.    RUNNING indicates that the execution is being processed by the cluster.    FINISHING indicates that execution processing is in the final stages.    FINISHED indicates that the execution has completed without error.    FAILING indicates that the execution is failing and will not finish successfully.    FAILED indicates that the execution failed.    STOP_PENDING indicates that the cluster has received a StopNotebookExecution request and the stop is pending.    STOPPING indicates that the cluster is in the process of stopping the execution as a result of a StopNotebookExecution request.    STOPPED indicates that the execution stopped because of a StopNotebookExecution request.
        public let status: NotebookExecutionStatus?
        /// A list of tags associated with a notebook execution. Tags are user-defined key-value pairs that consist of a required key string with a maximum of 128 characters and an optional value string with a maximum of 256 characters.
        public let tags: [Tag]?

        @inlinable
        public init(arn: String? = nil, editorId: String? = nil, endTime: Date? = nil, environmentVariables: [String: String]? = nil, executionEngine: ExecutionEngineConfig? = nil, lastStateChangeReason: String? = nil, notebookExecutionId: String? = nil, notebookExecutionName: String? = nil, notebookInstanceSecurityGroupId: String? = nil, notebookParams: String? = nil, notebookS3Location: NotebookS3LocationForOutput? = nil, outputNotebookFormat: OutputNotebookFormat? = nil, outputNotebookS3Location: OutputNotebookS3LocationForOutput? = nil, outputNotebookURI: String? = nil, startTime: Date? = nil, status: NotebookExecutionStatus? = nil, tags: [Tag]? = nil) {
            self.arn = arn
            self.editorId = editorId
            self.endTime = endTime
            self.environmentVariables = environmentVariables
            self.executionEngine = executionEngine
            self.lastStateChangeReason = lastStateChangeReason
            self.notebookExecutionId = notebookExecutionId
            self.notebookExecutionName = notebookExecutionName
            self.notebookInstanceSecurityGroupId = notebookInstanceSecurityGroupId
            self.notebookParams = notebookParams
            self.notebookS3Location = notebookS3Location
            self.outputNotebookFormat = outputNotebookFormat
            self.outputNotebookS3Location = outputNotebookS3Location
            self.outputNotebookURI = outputNotebookURI
            self.startTime = startTime
            self.status = status
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case editorId = "EditorId"
            case endTime = "EndTime"
            case environmentVariables = "EnvironmentVariables"
            case executionEngine = "ExecutionEngine"
            case lastStateChangeReason = "LastStateChangeReason"
            case notebookExecutionId = "NotebookExecutionId"
            case notebookExecutionName = "NotebookExecutionName"
            case notebookInstanceSecurityGroupId = "NotebookInstanceSecurityGroupId"
            case notebookParams = "NotebookParams"
            case notebookS3Location = "NotebookS3Location"
            case outputNotebookFormat = "OutputNotebookFormat"
            case outputNotebookS3Location = "OutputNotebookS3Location"
            case outputNotebookURI = "OutputNotebookURI"
            case startTime = "StartTime"
            case status = "Status"
            case tags = "Tags"
        }
    }

    public struct NotebookExecutionSummary: AWSDecodableShape {
        /// The unique identifier of the editor associated with the notebook execution.
        public let editorId: String?
        /// The timestamp when notebook execution started.
        public let endTime: Date?
        /// The unique ID of the execution engine for the notebook execution.
        public let executionEngineId: String?
        /// The unique identifier of the notebook execution.
        public let notebookExecutionId: String?
        /// The name of the notebook execution.
        public let notebookExecutionName: String?
        /// The Amazon S3 location that stores the notebook execution input.
        public let notebookS3Location: NotebookS3LocationForOutput?
        /// The timestamp when notebook execution started.
        public let startTime: Date?
        /// The status of the notebook execution.    START_PENDING indicates that the cluster has received the execution request but execution has not begun.    STARTING indicates that the execution is starting on the cluster.    RUNNING indicates that the execution is being processed by the cluster.    FINISHING indicates that execution processing is in the final stages.    FINISHED indicates that the execution has completed without error.    FAILING indicates that the execution is failing and will not finish successfully.    FAILED indicates that the execution failed.    STOP_PENDING indicates that the cluster has received a StopNotebookExecution request and the stop is pending.    STOPPING indicates that the cluster is in the process of stopping the execution as a result of a StopNotebookExecution request.    STOPPED indicates that the execution stopped because of a StopNotebookExecution request.
        public let status: NotebookExecutionStatus?

        @inlinable
        public init(editorId: String? = nil, endTime: Date? = nil, executionEngineId: String? = nil, notebookExecutionId: String? = nil, notebookExecutionName: String? = nil, notebookS3Location: NotebookS3LocationForOutput? = nil, startTime: Date? = nil, status: NotebookExecutionStatus? = nil) {
            self.editorId = editorId
            self.endTime = endTime
            self.executionEngineId = executionEngineId
            self.notebookExecutionId = notebookExecutionId
            self.notebookExecutionName = notebookExecutionName
            self.notebookS3Location = notebookS3Location
            self.startTime = startTime
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case editorId = "EditorId"
            case endTime = "EndTime"
            case executionEngineId = "ExecutionEngineId"
            case notebookExecutionId = "NotebookExecutionId"
            case notebookExecutionName = "NotebookExecutionName"
            case notebookS3Location = "NotebookS3Location"
            case startTime = "StartTime"
            case status = "Status"
        }
    }

    public struct NotebookS3LocationForOutput: AWSDecodableShape {
        /// The Amazon S3 bucket that stores the notebook execution input.
        public let bucket: String?
        /// The key to the Amazon S3 location that stores the notebook execution input.
        public let key: String?

        @inlinable
        public init(bucket: String? = nil, key: String? = nil) {
            self.bucket = bucket
            self.key = key
        }

        private enum CodingKeys: String, CodingKey {
            case bucket = "Bucket"
            case key = "Key"
        }
    }

    public struct NotebookS3LocationFromInput: AWSEncodableShape {
        /// The Amazon S3 bucket that stores the notebook execution input.
        public let bucket: String?
        /// The key to the Amazon S3 location that stores the notebook execution input.
        public let key: String?

        @inlinable
        public init(bucket: String? = nil, key: String? = nil) {
            self.bucket = bucket
            self.key = key
        }

        public func validate(name: String) throws {
            try self.validate(self.bucket, name: "bucket", parent: name, max: 256)
            try self.validate(self.bucket, name: "bucket", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.key, name: "key", parent: name, max: 10280)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.key, name: "key", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDBFF-\\uDC00\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case bucket = "Bucket"
            case key = "Key"
        }
    }

    public struct OSRelease: AWSDecodableShape {
        /// The Amazon Linux release specified for a cluster in the RunJobFlow request. The format is as shown in  Amazon Linux 2 Release Notes . For example, 2.0.20220218.1.
        public let label: String?

        @inlinable
        public init(label: String? = nil) {
            self.label = label
        }

        private enum CodingKeys: String, CodingKey {
            case label = "Label"
        }
    }

    public struct OnDemandCapacityReservationOptions: AWSEncodableShape & AWSDecodableShape {
        /// Indicates the instance's Capacity Reservation preferences. Possible preferences include:    open - The instance can run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).    none - The instance avoids running in a Capacity Reservation even if one is available. The instance runs as an On-Demand Instance.
        public let capacityReservationPreference: OnDemandCapacityReservationPreference?
        /// The ARN of the Capacity Reservation resource group in which to run the instance.
        public let capacityReservationResourceGroupArn: String?
        /// Indicates whether to use unused Capacity Reservations for fulfilling On-Demand capacity. If you specify use-capacity-reservations-first, the fleet uses unused Capacity Reservations to fulfill On-Demand capacity up to the target On-Demand capacity. If multiple instance pools have unused Capacity Reservations, the On-Demand allocation strategy (lowest-price) is applied. If the number of unused Capacity Reservations is less than the On-Demand target capacity, the remaining On-Demand target capacity is launched according to the On-Demand allocation strategy (lowest-price). If you do not specify a value, the fleet fulfills the On-Demand capacity according to the chosen On-Demand allocation strategy.
        public let usageStrategy: OnDemandCapacityReservationUsageStrategy?

        @inlinable
        public init(capacityReservationPreference: OnDemandCapacityReservationPreference? = nil, capacityReservationResourceGroupArn: String? = nil, usageStrategy: OnDemandCapacityReservationUsageStrategy? = nil) {
            self.capacityReservationPreference = capacityReservationPreference
            self.capacityReservationResourceGroupArn = capacityReservationResourceGroupArn
            self.usageStrategy = usageStrategy
        }

        public func validate(name: String) throws {
            try self.validate(self.capacityReservationResourceGroupArn, name: "capacityReservationResourceGroupArn", parent: name, max: 256)
            try self.validate(self.capacityReservationResourceGroupArn, name: "capacityReservationResourceGroupArn", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case capacityReservationPreference = "CapacityReservationPreference"
            case capacityReservationResourceGroupArn = "CapacityReservationResourceGroupArn"
            case usageStrategy = "UsageStrategy"
        }
    }

    public struct OnDemandProvisioningSpecification: AWSEncodableShape & AWSDecodableShape {
        /// Specifies the strategy to use in launching On-Demand instance fleets. Available options are lowest-price and prioritized. lowest-price specifies to launch the instances with the lowest price first, and prioritized specifies that Amazon EMR should launch the instances with the highest priority first. The default is lowest-price.
        public let allocationStrategy: OnDemandProvisioningAllocationStrategy?
        /// The launch specification for On-Demand instances in the instance fleet, which determines the allocation strategy.
        public let capacityReservationOptions: OnDemandCapacityReservationOptions?

        @inlinable
        public init(allocationStrategy: OnDemandProvisioningAllocationStrategy? = nil, capacityReservationOptions: OnDemandCapacityReservationOptions? = nil) {
            self.allocationStrategy = allocationStrategy
            self.capacityReservationOptions = capacityReservationOptions
        }

        public func validate(name: String) throws {
            try self.capacityReservationOptions?.validate(name: "\(name).capacityReservationOptions")
        }

        private enum CodingKeys: String, CodingKey {
            case allocationStrategy = "AllocationStrategy"
            case capacityReservationOptions = "CapacityReservationOptions"
        }
    }

    public struct OnDemandResizingSpecification: AWSEncodableShape & AWSDecodableShape {
        /// Specifies the allocation strategy to use to launch On-Demand instances during a resize. The default is lowest-price.
        public let allocationStrategy: OnDemandProvisioningAllocationStrategy?
        public let capacityReservationOptions: OnDemandCapacityReservationOptions?
        /// On-Demand resize timeout in minutes. If On-Demand Instances are not provisioned within this time, the resize workflow stops. The minimum value is 5 minutes, and the maximum value is 10,080 minutes (7 days). The timeout applies to all resize workflows on the Instance Fleet. The resize could be triggered by Amazon EMR Managed Scaling or by the customer (via Amazon EMR Console, Amazon EMR CLI modify-instance-fleet or Amazon EMR SDK ModifyInstanceFleet API) or by Amazon EMR due to Amazon EC2 Spot Reclamation.
        public let timeoutDurationMinutes: Int?

        @inlinable
        public init(allocationStrategy: OnDemandProvisioningAllocationStrategy? = nil, capacityReservationOptions: OnDemandCapacityReservationOptions? = nil, timeoutDurationMinutes: Int? = nil) {
            self.allocationStrategy = allocationStrategy
            self.capacityReservationOptions = capacityReservationOptions
            self.timeoutDurationMinutes = timeoutDurationMinutes
        }

        public func validate(name: String) throws {
            try self.capacityReservationOptions?.validate(name: "\(name).capacityReservationOptions")
            try self.validate(self.timeoutDurationMinutes, name: "timeoutDurationMinutes", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case allocationStrategy = "AllocationStrategy"
            case capacityReservationOptions = "CapacityReservationOptions"
            case timeoutDurationMinutes = "TimeoutDurationMinutes"
        }
    }

    public struct OutputNotebookS3LocationForOutput: AWSDecodableShape {
        /// The Amazon S3 bucket that stores the notebook execution output.
        public let bucket: String?
        /// The key to the Amazon S3 location that stores the notebook execution output.
        public let key: String?

        @inlinable
        public init(bucket: String? = nil, key: String? = nil) {
            self.bucket = bucket
            self.key = key
        }

        private enum CodingKeys: String, CodingKey {
            case bucket = "Bucket"
            case key = "Key"
        }
    }

    public struct OutputNotebookS3LocationFromInput: AWSEncodableShape {
        /// The Amazon S3 bucket that stores the notebook execution output.
        public let bucket: String?
        /// The key to the Amazon S3 location that stores the notebook execution output.
        public let key: String?

        @inlinable
        public init(bucket: String? = nil, key: String? = nil) {
            self.bucket = bucket
            self.key = key
        }

        public func validate(name: String) throws {
            try self.validate(self.bucket, name: "bucket", parent: name, max: 256)
            try self.validate(self.bucket, name: "bucket", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.key, name: "key", parent: name, max: 10280)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.key, name: "key", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDBFF-\\uDC00\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case bucket = "Bucket"
            case key = "Key"
        }
    }

    public struct PersistentAppUI: AWSDecodableShape {
        /// The author ID for the persistent application user interface object.
        public let authorId: String?
        /// The creation date and time for the persistent application user interface object.
        public let creationTime: Date?
        /// The date and time the persistent application user interface object was last changed.
        public let lastModifiedTime: Date?
        /// The reason the persistent application user interface object was last changed.
        public let lastStateChangeReason: String?
        /// The identifier for the persistent application user interface object.
        public let persistentAppUIId: String?
        /// The status for the persistent application user interface object.
        public let persistentAppUIStatus: String?
        /// The type list for the persistent application user interface object. Valid values  include SHS, YTS, or TEZ.
        public let persistentAppUITypeList: [PersistentAppUIType]?
        /// A collection of tags for the persistent application user interface object.
        public let tags: [Tag]?

        @inlinable
        public init(authorId: String? = nil, creationTime: Date? = nil, lastModifiedTime: Date? = nil, lastStateChangeReason: String? = nil, persistentAppUIId: String? = nil, persistentAppUIStatus: String? = nil, persistentAppUITypeList: [PersistentAppUIType]? = nil, tags: [Tag]? = nil) {
            self.authorId = authorId
            self.creationTime = creationTime
            self.lastModifiedTime = lastModifiedTime
            self.lastStateChangeReason = lastStateChangeReason
            self.persistentAppUIId = persistentAppUIId
            self.persistentAppUIStatus = persistentAppUIStatus
            self.persistentAppUITypeList = persistentAppUITypeList
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case authorId = "AuthorId"
            case creationTime = "CreationTime"
            case lastModifiedTime = "LastModifiedTime"
            case lastStateChangeReason = "LastStateChangeReason"
            case persistentAppUIId = "PersistentAppUIId"
            case persistentAppUIStatus = "PersistentAppUIStatus"
            case persistentAppUITypeList = "PersistentAppUITypeList"
            case tags = "Tags"
        }
    }

    public struct PlacementGroupConfig: AWSEncodableShape & AWSDecodableShape {
        /// Role of the instance in the cluster. Starting with Amazon EMR release 5.23.0, the only supported instance role is MASTER.
        public let instanceRole: InstanceRoleType?
        /// Amazon EC2 Placement Group strategy associated with instance role. Starting with Amazon EMR release 5.23.0, the only supported placement strategy is SPREAD for the MASTER instance role.
        public let placementStrategy: PlacementGroupStrategy?

        @inlinable
        public init(instanceRole: InstanceRoleType? = nil, placementStrategy: PlacementGroupStrategy? = nil) {
            self.instanceRole = instanceRole
            self.placementStrategy = placementStrategy
        }

        private enum CodingKeys: String, CodingKey {
            case instanceRole = "InstanceRole"
            case placementStrategy = "PlacementStrategy"
        }
    }

    public struct PlacementType: AWSEncodableShape & AWSDecodableShape {
        /// The Amazon EC2 Availability Zone for the cluster. AvailabilityZone is used for uniform instance groups, while AvailabilityZones (plural) is used for instance fleets.
        public let availabilityZone: String?
        /// When multiple Availability Zones are specified, Amazon EMR evaluates them and launches instances in the optimal Availability Zone. AvailabilityZones is used for instance fleets, while AvailabilityZone (singular) is used for uniform instance groups.  The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x versions.
        public let availabilityZones: [String]?

        @inlinable
        public init(availabilityZone: String? = nil, availabilityZones: [String]? = nil) {
            self.availabilityZone = availabilityZone
            self.availabilityZones = availabilityZones
        }

        public func validate(name: String) throws {
            try self.validate(self.availabilityZone, name: "availabilityZone", parent: name, max: 10280)
            try self.validate(self.availabilityZone, name: "availabilityZone", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.availabilityZones?.forEach {
                try validate($0, name: "availabilityZones[]", parent: name, max: 256)
                try validate($0, name: "availabilityZones[]", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case availabilityZone = "AvailabilityZone"
            case availabilityZones = "AvailabilityZones"
        }
    }

    public struct PortRange: AWSEncodableShape & AWSDecodableShape {
        /// The smallest port number in a specified range of port numbers.
        public let maxRange: Int?
        /// The smallest port number in a specified range of port numbers.
        public let minRange: Int?

        @inlinable
        public init(maxRange: Int? = nil, minRange: Int? = nil) {
            self.maxRange = maxRange
            self.minRange = minRange
        }

        public func validate(name: String) throws {
            try self.validate(self.maxRange, name: "maxRange", parent: name, max: 65535)
            try self.validate(self.maxRange, name: "maxRange", parent: name, min: -1)
            try self.validate(self.minRange, name: "minRange", parent: name, max: 65535)
            try self.validate(self.minRange, name: "minRange", parent: name, min: -1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxRange = "MaxRange"
            case minRange = "MinRange"
        }
    }

    public struct PutAutoScalingPolicyInput: AWSEncodableShape {
        /// Specifies the definition of the automatic scaling policy.
        public let autoScalingPolicy: AutoScalingPolicy?
        /// Specifies the ID of a cluster. The instance group to which the automatic scaling policy is applied is within this cluster.
        public let clusterId: String?
        /// Specifies the ID of the instance group to which the automatic scaling policy is applied.
        public let instanceGroupId: String?

        @inlinable
        public init(autoScalingPolicy: AutoScalingPolicy? = nil, clusterId: String? = nil, instanceGroupId: String? = nil) {
            self.autoScalingPolicy = autoScalingPolicy
            self.clusterId = clusterId
            self.instanceGroupId = instanceGroupId
        }

        public func validate(name: String) throws {
            try self.autoScalingPolicy?.validate(name: "\(name).autoScalingPolicy")
        }

        private enum CodingKeys: String, CodingKey {
            case autoScalingPolicy = "AutoScalingPolicy"
            case clusterId = "ClusterId"
            case instanceGroupId = "InstanceGroupId"
        }
    }

    public struct PutAutoScalingPolicyOutput: AWSDecodableShape {
        /// The automatic scaling policy definition.
        public let autoScalingPolicy: AutoScalingPolicyDescription?
        /// The Amazon Resource Name (ARN) of the cluster.
        public let clusterArn: String?
        /// Specifies the ID of a cluster. The instance group to which the automatic scaling policy is applied is within this cluster.
        public let clusterId: String?
        /// Specifies the ID of the instance group to which the scaling policy is applied.
        public let instanceGroupId: String?

        @inlinable
        public init(autoScalingPolicy: AutoScalingPolicyDescription? = nil, clusterArn: String? = nil, clusterId: String? = nil, instanceGroupId: String? = nil) {
            self.autoScalingPolicy = autoScalingPolicy
            self.clusterArn = clusterArn
            self.clusterId = clusterId
            self.instanceGroupId = instanceGroupId
        }

        private enum CodingKeys: String, CodingKey {
            case autoScalingPolicy = "AutoScalingPolicy"
            case clusterArn = "ClusterArn"
            case clusterId = "ClusterId"
            case instanceGroupId = "InstanceGroupId"
        }
    }

    public struct PutAutoTerminationPolicyInput: AWSEncodableShape {
        /// Specifies the auto-termination policy to attach to the cluster.
        public let autoTerminationPolicy: AutoTerminationPolicy?
        /// Specifies the ID of the Amazon EMR cluster to which the auto-termination policy will be attached.
        public let clusterId: String?

        @inlinable
        public init(autoTerminationPolicy: AutoTerminationPolicy? = nil, clusterId: String? = nil) {
            self.autoTerminationPolicy = autoTerminationPolicy
            self.clusterId = clusterId
        }

        private enum CodingKeys: String, CodingKey {
            case autoTerminationPolicy = "AutoTerminationPolicy"
            case clusterId = "ClusterId"
        }
    }

    public struct PutAutoTerminationPolicyOutput: AWSDecodableShape {
        public init() {}
    }

    public struct PutBlockPublicAccessConfigurationInput: AWSEncodableShape {
        /// A configuration for Amazon EMR block public access. The configuration applies to all clusters created in your account for the current Region. The configuration specifies whether block public access is enabled. If block public access is enabled, security groups associated with the cluster cannot have rules that allow inbound traffic from 0.0.0.0/0 or ::/0 on a port, unless the port is specified as an exception using PermittedPublicSecurityGroupRuleRanges in the BlockPublicAccessConfiguration. By default, Port 22 (SSH) is an exception, and public access is allowed on this port. You can change this by updating BlockPublicSecurityGroupRules to remove the exception.  For accounts that created clusters in a Region before November 25, 2019, block public access is disabled by default in that Region. To use this feature, you must manually enable and configure it. For accounts that did not create an Amazon EMR cluster in a Region before this date, block public access is enabled by default in that Region.
        public let blockPublicAccessConfiguration: BlockPublicAccessConfiguration?

        @inlinable
        public init(blockPublicAccessConfiguration: BlockPublicAccessConfiguration? = nil) {
            self.blockPublicAccessConfiguration = blockPublicAccessConfiguration
        }

        public func validate(name: String) throws {
            try self.blockPublicAccessConfiguration?.validate(name: "\(name).blockPublicAccessConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case blockPublicAccessConfiguration = "BlockPublicAccessConfiguration"
        }
    }

    public struct PutBlockPublicAccessConfigurationOutput: AWSDecodableShape {
        public init() {}
    }

    public struct PutManagedScalingPolicyInput: AWSEncodableShape {
        /// Specifies the ID of an Amazon EMR cluster where the managed scaling policy is attached.
        public let clusterId: String?
        /// Specifies the constraints for the managed scaling policy.
        public let managedScalingPolicy: ManagedScalingPolicy?

        @inlinable
        public init(clusterId: String? = nil, managedScalingPolicy: ManagedScalingPolicy? = nil) {
            self.clusterId = clusterId
            self.managedScalingPolicy = managedScalingPolicy
        }

        public func validate(name: String) throws {
            try self.managedScalingPolicy?.validate(name: "\(name).managedScalingPolicy")
        }

        private enum CodingKeys: String, CodingKey {
            case clusterId = "ClusterId"
            case managedScalingPolicy = "ManagedScalingPolicy"
        }
    }

    public struct PutManagedScalingPolicyOutput: AWSDecodableShape {
        public init() {}
    }

    public struct ReleaseLabelFilter: AWSEncodableShape {
        /// Optional release label application filter. For example, spark@2.1.0.
        public let application: String?
        /// Optional release label version prefix filter. For example, emr-5.
        public let prefix: String?

        @inlinable
        public init(application: String? = nil, prefix: String? = nil) {
            self.application = application
            self.prefix = prefix
        }

        private enum CodingKeys: String, CodingKey {
            case application = "Application"
            case prefix = "Prefix"
        }
    }

    public struct RemoveAutoScalingPolicyInput: AWSEncodableShape {
        /// Specifies the ID of a cluster. The instance group to which the automatic scaling policy is applied is within this cluster.
        public let clusterId: String?
        /// Specifies the ID of the instance group to which the scaling policy is applied.
        public let instanceGroupId: String?

        @inlinable
        public init(clusterId: String? = nil, instanceGroupId: String? = nil) {
            self.clusterId = clusterId
            self.instanceGroupId = instanceGroupId
        }

        private enum CodingKeys: String, CodingKey {
            case clusterId = "ClusterId"
            case instanceGroupId = "InstanceGroupId"
        }
    }

    public struct RemoveAutoScalingPolicyOutput: AWSDecodableShape {
        public init() {}
    }

    public struct RemoveAutoTerminationPolicyInput: AWSEncodableShape {
        /// Specifies the ID of the Amazon EMR cluster from which the auto-termination policy will be removed.
        public let clusterId: String?

        @inlinable
        public init(clusterId: String? = nil) {
            self.clusterId = clusterId
        }

        private enum CodingKeys: String, CodingKey {
            case clusterId = "ClusterId"
        }
    }

    public struct RemoveAutoTerminationPolicyOutput: AWSDecodableShape {
        public init() {}
    }

    public struct RemoveManagedScalingPolicyInput: AWSEncodableShape {
        ///  Specifies the ID of the cluster from which the managed scaling policy will be removed.
        public let clusterId: String?

        @inlinable
        public init(clusterId: String? = nil) {
            self.clusterId = clusterId
        }

        private enum CodingKeys: String, CodingKey {
            case clusterId = "ClusterId"
        }
    }

    public struct RemoveManagedScalingPolicyOutput: AWSDecodableShape {
        public init() {}
    }

    public struct RemoveTagsInput: AWSEncodableShape {
        /// The Amazon EMR resource identifier from which tags will be removed. For example, a cluster identifier or an Amazon EMR Studio ID.
        public let resourceId: String?
        /// A list of tag keys to remove from the resource.
        public let tagKeys: [String]?

        @inlinable
        public init(resourceId: String? = nil, tagKeys: [String]? = nil) {
            self.resourceId = resourceId
            self.tagKeys = tagKeys
        }

        private enum CodingKeys: String, CodingKey {
            case resourceId = "ResourceId"
            case tagKeys = "TagKeys"
        }
    }

    public struct RemoveTagsOutput: AWSDecodableShape {
        public init() {}
    }

    public struct RunJobFlowInput: AWSEncodableShape {
        /// A JSON string for selecting additional features.
        public let additionalInfo: String?
        /// Applies only to Amazon EMR AMI versions 3.x and 2.x. For Amazon EMR releases 4.0 and later, ReleaseLabel is used. To specify a custom AMI, use CustomAmiID.
        public let amiVersion: String?
        /// Applies to Amazon EMR releases 4.0 and later. A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. For a list of applications available for each Amazon EMR release version, see the Amazon EMRRelease Guide.
        public let applications: [Application]?
        /// An IAM role for automatic scaling policies. The default role is EMR_AutoScaling_DefaultRole. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate Amazon EC2 instances in an instance group.
        public let autoScalingRole: String?
        public let autoTerminationPolicy: AutoTerminationPolicy?
        /// A list of bootstrap actions to run before Hadoop starts on the cluster nodes.
        public let bootstrapActions: [BootstrapActionConfig]?
        /// For Amazon EMR releases 4.0 and later. The list of configurations supplied for the Amazon EMR cluster that you are creating.
        public let configurations: [Configuration]?
        /// Available only in Amazon EMR releases 5.7.0 and later. The ID of a custom Amazon EBS-backed Linux AMI. If specified, Amazon EMR uses this AMI when it launches cluster Amazon EC2 instances. For more information about custom AMIs in Amazon EMR, see Using a Custom AMI in the Amazon EMR Management Guide. If omitted, the cluster uses the base Linux AMI for the ReleaseLabel specified. For Amazon EMR releases 2.x and 3.x, use AmiVersion instead. For information about creating a custom AMI, see Creating an Amazon EBS-Backed Linux AMI in the Amazon Elastic Compute Cloud User Guide for Linux Instances. For information about finding an AMI ID, see Finding a Linux AMI.
        public let customAmiId: String?
        /// The IOPS, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 6.15.0 and later.
        public let ebsRootVolumeIops: Int?
        /// The size, in GiB, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 4.x and later.
        public let ebsRootVolumeSize: Int?
        /// The throughput, in MiB/s, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 6.15.0 and later.
        public let ebsRootVolumeThroughput: Int?
        /// Reserved.
        public let extendedSupport: Bool?
        /// A specification of the number and type of Amazon EC2 instances.
        public let instances: JobFlowInstancesConfig?
        /// Also called instance profile and Amazon EC2 role. An IAM role for an Amazon EMR cluster. The Amazon EC2 instances of the cluster assume this role. The default role is EMR_EC2_DefaultRole. In order to use the default role, you must have already created it using the CLI or console.
        public let jobFlowRole: String?
        /// Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration. For more information see Use Kerberos Authentication in the Amazon EMR Management Guide.
        public let kerberosAttributes: KerberosAttributes?
        /// The KMS key used for encrypting log files. If a value is not provided, the logs remain encrypted by AES-256. This attribute is only available with Amazon EMR releases 5.30.0 and later, excluding Amazon EMR 6.0.0.
        public let logEncryptionKmsKeyId: String?
        /// The location in Amazon S3 to write the log files of the job flow. If a value is not provided, logs are not created.
        public let logUri: String?
        ///  The specified managed scaling policy for an Amazon EMR cluster.
        public let managedScalingPolicy: ManagedScalingPolicy?
        /// The name of the job flow.
        public let name: String?
        ///  For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications.  A list of strings that indicates third-party software to use with the job flow that accepts a user argument list. Amazon EMR accepts and forwards the argument list to the corresponding installation script as bootstrap action arguments. For more information, see "Launch a Job Flow on the MapR Distribution for Hadoop" in the Amazon EMR Developer Guide. Supported values are:   "mapr-m3" - launch the cluster using MapR M3 Edition.   "mapr-m5" - launch the cluster using MapR M5 Edition.   "mapr" with the user arguments specifying "--edition,m3" or "--edition,m5" - launch the job flow using MapR M3 or M5 Edition respectively.   "mapr-m7" - launch the cluster using MapR M7 Edition.   "hunk" - launch the cluster with the Hunk Big Data Analytics Platform.   "hue"- launch the cluster with Hue installed.   "spark" - launch the cluster with Apache Spark installed.   "ganglia" - launch the cluster with the Ganglia Monitoring System installed.
        public let newSupportedProducts: [SupportedProductConfig]?
        /// Specifies a particular Amazon Linux release for all nodes in a cluster launch RunJobFlow request. If a release is not specified, Amazon EMR uses the latest validated Amazon Linux release for cluster launch.
        public let osReleaseLabel: String?
        /// The specified placement group configuration for an Amazon EMR cluster.
        public let placementGroupConfigs: [PlacementGroupConfig]?
        /// The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster. Release labels are in the form emr-x.x.x, where x.x.x is an Amazon EMR release version such as emr-5.14.0. For more information about Amazon EMR release versions and included application versions and features, see https://docs.aws.amazon.com/emr/latest/ReleaseGuide/. The release label applies only to Amazon EMR releases version 4.0 and later. Earlier versions use AmiVersion.
        public let releaseLabel: String?
        /// Applies only when CustomAmiID is used. Specifies which updates from the Amazon Linux AMI package repositories to apply automatically when the instance boots using the AMI. If omitted, the default is SECURITY, which indicates that only security updates are applied. If NONE is specified, no updates are applied, and all updates must be applied manually.
        public let repoUpgradeOnBoot: RepoUpgradeOnBoot?
        /// Specifies the way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized. TERMINATE_AT_INSTANCE_HOUR indicates that Amazon EMR terminates nodes at the instance-hour boundary, regardless of when the request to terminate the instance was submitted. This option is only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that version. TERMINATE_AT_TASK_COMPLETION indicates that Amazon EMR adds nodes to a deny list and drains tasks from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour boundary. With either behavior, Amazon EMR removes the least active nodes first and blocks instance termination if it could lead to HDFS corruption. TERMINATE_AT_TASK_COMPLETION available only in Amazon EMR releases 4.1.0 and later, and is the default for releases of Amazon EMR earlier than 5.1.0.
        public let scaleDownBehavior: ScaleDownBehavior?
        /// The name of a security configuration to apply to the cluster.
        public let securityConfiguration: String?
        /// The IAM role that Amazon EMR assumes in order to access Amazon Web Services resources on your behalf. If you've created a custom service role path, you must specify it for the service role when you launch your cluster.
        public let serviceRole: String?
        /// Specifies the number of steps that can be executed concurrently. The default value is 1. The maximum value is 256.
        public let stepConcurrencyLevel: Int?
        /// A list of steps to run.
        public let steps: [StepConfig]?
        ///  For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications.  A list of strings that indicates third-party software to use. For more information, see the Amazon EMR Developer Guide. Currently supported values are:   "mapr-m3" - launch the job flow using MapR M3 Edition.   "mapr-m5" - launch the job flow using MapR M5 Edition.
        public let supportedProducts: [String]?
        /// A list of tags to associate with a cluster and propagate to Amazon EC2 instances.
        public let tags: [Tag]?
        ///  The VisibleToAllUsers parameter is no longer supported. By default, the value is set to true. Setting it to false now has no effect.  Set this value to true so that IAM principals in the Amazon Web Services account associated with the cluster can perform Amazon EMR actions on the cluster that their IAM policies allow. This value defaults to true for clusters created using the Amazon EMR API or the CLI create-cluster command. When set to false, only the IAM principal that created the cluster and the Amazon Web Services account root user can perform Amazon EMR actions for the cluster, regardless of the IAM permissions policies attached to other IAM principals. For more information, see Understanding the Amazon EMR cluster VisibleToAllUsers setting in the Amazon EMR Management Guide.
        public let visibleToAllUsers: Bool?

        @inlinable
        public init(additionalInfo: String? = nil, amiVersion: String? = nil, applications: [Application]? = nil, autoScalingRole: String? = nil, autoTerminationPolicy: AutoTerminationPolicy? = nil, bootstrapActions: [BootstrapActionConfig]? = nil, configurations: [Configuration]? = nil, customAmiId: String? = nil, ebsRootVolumeIops: Int? = nil, ebsRootVolumeSize: Int? = nil, ebsRootVolumeThroughput: Int? = nil, extendedSupport: Bool? = nil, instances: JobFlowInstancesConfig? = nil, jobFlowRole: String? = nil, kerberosAttributes: KerberosAttributes? = nil, logEncryptionKmsKeyId: String? = nil, logUri: String? = nil, managedScalingPolicy: ManagedScalingPolicy? = nil, name: String? = nil, newSupportedProducts: [SupportedProductConfig]? = nil, osReleaseLabel: String? = nil, placementGroupConfigs: [PlacementGroupConfig]? = nil, releaseLabel: String? = nil, repoUpgradeOnBoot: RepoUpgradeOnBoot? = nil, scaleDownBehavior: ScaleDownBehavior? = nil, securityConfiguration: String? = nil, serviceRole: String? = nil, stepConcurrencyLevel: Int? = nil, steps: [StepConfig]? = nil, supportedProducts: [String]? = nil, tags: [Tag]? = nil, visibleToAllUsers: Bool? = nil) {
            self.additionalInfo = additionalInfo
            self.amiVersion = amiVersion
            self.applications = applications
            self.autoScalingRole = autoScalingRole
            self.autoTerminationPolicy = autoTerminationPolicy
            self.bootstrapActions = bootstrapActions
            self.configurations = configurations
            self.customAmiId = customAmiId
            self.ebsRootVolumeIops = ebsRootVolumeIops
            self.ebsRootVolumeSize = ebsRootVolumeSize
            self.ebsRootVolumeThroughput = ebsRootVolumeThroughput
            self.extendedSupport = extendedSupport
            self.instances = instances
            self.jobFlowRole = jobFlowRole
            self.kerberosAttributes = kerberosAttributes
            self.logEncryptionKmsKeyId = logEncryptionKmsKeyId
            self.logUri = logUri
            self.managedScalingPolicy = managedScalingPolicy
            self.name = name
            self.newSupportedProducts = newSupportedProducts
            self.osReleaseLabel = osReleaseLabel
            self.placementGroupConfigs = placementGroupConfigs
            self.releaseLabel = releaseLabel
            self.repoUpgradeOnBoot = repoUpgradeOnBoot
            self.scaleDownBehavior = scaleDownBehavior
            self.securityConfiguration = securityConfiguration
            self.serviceRole = serviceRole
            self.stepConcurrencyLevel = stepConcurrencyLevel
            self.steps = steps
            self.supportedProducts = supportedProducts
            self.tags = tags
            self.visibleToAllUsers = visibleToAllUsers
        }

        public func validate(name: String) throws {
            try self.validate(self.additionalInfo, name: "additionalInfo", parent: name, max: 10280)
            try self.validate(self.additionalInfo, name: "additionalInfo", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.amiVersion, name: "amiVersion", parent: name, max: 256)
            try self.validate(self.amiVersion, name: "amiVersion", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.autoScalingRole, name: "autoScalingRole", parent: name, max: 10280)
            try self.validate(self.autoScalingRole, name: "autoScalingRole", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.bootstrapActions?.forEach {
                try $0.validate(name: "\(name).bootstrapActions[]")
            }
            try self.validate(self.customAmiId, name: "customAmiId", parent: name, max: 256)
            try self.validate(self.customAmiId, name: "customAmiId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.instances?.validate(name: "\(name).instances")
            try self.validate(self.jobFlowRole, name: "jobFlowRole", parent: name, max: 10280)
            try self.validate(self.jobFlowRole, name: "jobFlowRole", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.kerberosAttributes?.validate(name: "\(name).kerberosAttributes")
            try self.validate(self.logEncryptionKmsKeyId, name: "logEncryptionKmsKeyId", parent: name, max: 10280)
            try self.validate(self.logEncryptionKmsKeyId, name: "logEncryptionKmsKeyId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.logUri, name: "logUri", parent: name, max: 10280)
            try self.validate(self.logUri, name: "logUri", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.managedScalingPolicy?.validate(name: "\(name).managedScalingPolicy")
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.newSupportedProducts?.forEach {
                try $0.validate(name: "\(name).newSupportedProducts[]")
            }
            try self.validate(self.osReleaseLabel, name: "osReleaseLabel", parent: name, max: 256)
            try self.validate(self.osReleaseLabel, name: "osReleaseLabel", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.releaseLabel, name: "releaseLabel", parent: name, max: 256)
            try self.validate(self.releaseLabel, name: "releaseLabel", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.securityConfiguration, name: "securityConfiguration", parent: name, max: 10280)
            try self.validate(self.securityConfiguration, name: "securityConfiguration", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.serviceRole, name: "serviceRole", parent: name, max: 10280)
            try self.validate(self.serviceRole, name: "serviceRole", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.steps?.forEach {
                try $0.validate(name: "\(name).steps[]")
            }
            try self.supportedProducts?.forEach {
                try validate($0, name: "supportedProducts[]", parent: name, max: 256)
                try validate($0, name: "supportedProducts[]", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case additionalInfo = "AdditionalInfo"
            case amiVersion = "AmiVersion"
            case applications = "Applications"
            case autoScalingRole = "AutoScalingRole"
            case autoTerminationPolicy = "AutoTerminationPolicy"
            case bootstrapActions = "BootstrapActions"
            case configurations = "Configurations"
            case customAmiId = "CustomAmiId"
            case ebsRootVolumeIops = "EbsRootVolumeIops"
            case ebsRootVolumeSize = "EbsRootVolumeSize"
            case ebsRootVolumeThroughput = "EbsRootVolumeThroughput"
            case extendedSupport = "ExtendedSupport"
            case instances = "Instances"
            case jobFlowRole = "JobFlowRole"
            case kerberosAttributes = "KerberosAttributes"
            case logEncryptionKmsKeyId = "LogEncryptionKmsKeyId"
            case logUri = "LogUri"
            case managedScalingPolicy = "ManagedScalingPolicy"
            case name = "Name"
            case newSupportedProducts = "NewSupportedProducts"
            case osReleaseLabel = "OSReleaseLabel"
            case placementGroupConfigs = "PlacementGroupConfigs"
            case releaseLabel = "ReleaseLabel"
            case repoUpgradeOnBoot = "RepoUpgradeOnBoot"
            case scaleDownBehavior = "ScaleDownBehavior"
            case securityConfiguration = "SecurityConfiguration"
            case serviceRole = "ServiceRole"
            case stepConcurrencyLevel = "StepConcurrencyLevel"
            case steps = "Steps"
            case supportedProducts = "SupportedProducts"
            case tags = "Tags"
            case visibleToAllUsers = "VisibleToAllUsers"
        }
    }

    public struct RunJobFlowOutput: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the cluster.
        public let clusterArn: String?
        /// A unique identifier for the job flow.
        public let jobFlowId: String?

        @inlinable
        public init(clusterArn: String? = nil, jobFlowId: String? = nil) {
            self.clusterArn = clusterArn
            self.jobFlowId = jobFlowId
        }

        private enum CodingKeys: String, CodingKey {
            case clusterArn = "ClusterArn"
            case jobFlowId = "JobFlowId"
        }
    }

    public struct ScalingAction: AWSEncodableShape & AWSDecodableShape {
        /// Not available for instance groups. Instance groups use the market type specified for the group.
        public let market: MarketType?
        /// The type of adjustment the automatic scaling activity makes when triggered, and the periodicity of the adjustment.
        public let simpleScalingPolicyConfiguration: SimpleScalingPolicyConfiguration?

        @inlinable
        public init(market: MarketType? = nil, simpleScalingPolicyConfiguration: SimpleScalingPolicyConfiguration? = nil) {
            self.market = market
            self.simpleScalingPolicyConfiguration = simpleScalingPolicyConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case market = "Market"
            case simpleScalingPolicyConfiguration = "SimpleScalingPolicyConfiguration"
        }
    }

    public struct ScalingConstraints: AWSEncodableShape & AWSDecodableShape {
        /// The upper boundary of Amazon EC2 instances in an instance group beyond which scaling activities are not allowed to grow. Scale-out activities will not add instances beyond this boundary.
        public let maxCapacity: Int?
        /// The lower boundary of Amazon EC2 instances in an instance group below which scaling activities are not allowed to shrink. Scale-in activities will not terminate instances below this boundary.
        public let minCapacity: Int?

        @inlinable
        public init(maxCapacity: Int? = nil, minCapacity: Int? = nil) {
            self.maxCapacity = maxCapacity
            self.minCapacity = minCapacity
        }

        private enum CodingKeys: String, CodingKey {
            case maxCapacity = "MaxCapacity"
            case minCapacity = "MinCapacity"
        }
    }

    public struct ScalingRule: AWSEncodableShape & AWSDecodableShape {
        /// The conditions that trigger an automatic scaling activity.
        public let action: ScalingAction?
        /// A friendly, more verbose description of the automatic scaling rule.
        public let description: String?
        /// The name used to identify an automatic scaling rule. Rule names must be unique within a scaling policy.
        public let name: String?
        /// The CloudWatch alarm definition that determines when automatic scaling activity is triggered.
        public let trigger: ScalingTrigger?

        @inlinable
        public init(action: ScalingAction? = nil, description: String? = nil, name: String? = nil, trigger: ScalingTrigger? = nil) {
            self.action = action
            self.description = description
            self.name = name
            self.trigger = trigger
        }

        public func validate(name: String) throws {
            try self.trigger?.validate(name: "\(name).trigger")
        }

        private enum CodingKeys: String, CodingKey {
            case action = "Action"
            case description = "Description"
            case name = "Name"
            case trigger = "Trigger"
        }
    }

    public struct ScalingTrigger: AWSEncodableShape & AWSDecodableShape {
        /// The definition of a CloudWatch metric alarm. When the defined alarm conditions are met along with other trigger parameters, scaling activity begins.
        public let cloudWatchAlarmDefinition: CloudWatchAlarmDefinition?

        @inlinable
        public init(cloudWatchAlarmDefinition: CloudWatchAlarmDefinition? = nil) {
            self.cloudWatchAlarmDefinition = cloudWatchAlarmDefinition
        }

        public func validate(name: String) throws {
            try self.cloudWatchAlarmDefinition?.validate(name: "\(name).cloudWatchAlarmDefinition")
        }

        private enum CodingKeys: String, CodingKey {
            case cloudWatchAlarmDefinition = "CloudWatchAlarmDefinition"
        }
    }

    public struct ScriptBootstrapActionConfig: AWSEncodableShape & AWSDecodableShape {
        /// A list of command line arguments to pass to the bootstrap action script.
        public let args: [String]?
        /// Location in Amazon S3 of the script to run during a bootstrap action.
        public let path: String?

        @inlinable
        public init(args: [String]? = nil, path: String? = nil) {
            self.args = args
            self.path = path
        }

        public func validate(name: String) throws {
            try self.args?.forEach {
                try validate($0, name: "args[]", parent: name, max: 10280)
                try validate($0, name: "args[]", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            }
            try self.validate(self.path, name: "path", parent: name, max: 10280)
            try self.validate(self.path, name: "path", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case args = "Args"
            case path = "Path"
        }
    }

    public struct SecurityConfigurationSummary: AWSDecodableShape {
        /// The date and time the security configuration was created.
        public let creationDateTime: Date?
        /// The name of the security configuration.
        public let name: String?

        @inlinable
        public init(creationDateTime: Date? = nil, name: String? = nil) {
            self.creationDateTime = creationDateTime
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case creationDateTime = "CreationDateTime"
            case name = "Name"
        }
    }

    public struct SessionMappingDetail: AWSDecodableShape {
        /// The time the session mapping was created.
        public let creationTime: Date?
        /// The globally unique identifier (GUID) of the user or group.
        public let identityId: String?
        /// The name of the user or group. For more information, see UserName and DisplayName in the IAM Identity Center Identity Store API Reference.
        public let identityName: String?
        /// Specifies whether the identity mapped to the Amazon EMR Studio is a user or a group.
        public let identityType: IdentityType?
        /// The time the session mapping was last modified.
        public let lastModifiedTime: Date?
        /// The Amazon Resource Name (ARN) of the session policy associated with the user or group.
        public let sessionPolicyArn: String?
        /// The ID of the Amazon EMR Studio.
        public let studioId: String?

        @inlinable
        public init(creationTime: Date? = nil, identityId: String? = nil, identityName: String? = nil, identityType: IdentityType? = nil, lastModifiedTime: Date? = nil, sessionPolicyArn: String? = nil, studioId: String? = nil) {
            self.creationTime = creationTime
            self.identityId = identityId
            self.identityName = identityName
            self.identityType = identityType
            self.lastModifiedTime = lastModifiedTime
            self.sessionPolicyArn = sessionPolicyArn
            self.studioId = studioId
        }

        private enum CodingKeys: String, CodingKey {
            case creationTime = "CreationTime"
            case identityId = "IdentityId"
            case identityName = "IdentityName"
            case identityType = "IdentityType"
            case lastModifiedTime = "LastModifiedTime"
            case sessionPolicyArn = "SessionPolicyArn"
            case studioId = "StudioId"
        }
    }

    public struct SessionMappingSummary: AWSDecodableShape {
        /// The time the session mapping was created.
        public let creationTime: Date?
        /// The globally unique identifier (GUID) of the user or group from the IAM Identity Center Identity Store.
        public let identityId: String?
        /// The name of the user or group. For more information, see UserName and DisplayName in the IAM Identity Center Identity Store API Reference.
        public let identityName: String?
        /// Specifies whether the identity mapped to the Amazon EMR Studio is a user or a group.
        public let identityType: IdentityType?
        /// The Amazon Resource Name (ARN) of the session policy associated with the user or group.
        public let sessionPolicyArn: String?
        /// The ID of the Amazon EMR Studio.
        public let studioId: String?

        @inlinable
        public init(creationTime: Date? = nil, identityId: String? = nil, identityName: String? = nil, identityType: IdentityType? = nil, sessionPolicyArn: String? = nil, studioId: String? = nil) {
            self.creationTime = creationTime
            self.identityId = identityId
            self.identityName = identityName
            self.identityType = identityType
            self.sessionPolicyArn = sessionPolicyArn
            self.studioId = studioId
        }

        private enum CodingKeys: String, CodingKey {
            case creationTime = "CreationTime"
            case identityId = "IdentityId"
            case identityName = "IdentityName"
            case identityType = "IdentityType"
            case sessionPolicyArn = "SessionPolicyArn"
            case studioId = "StudioId"
        }
    }

    public struct SetKeepJobFlowAliveWhenNoStepsInput: AWSEncodableShape {
        /// A list of strings that uniquely identify the clusters to protect. This identifier is returned by  RunJobFlow and can also  be obtained from DescribeJobFlows.
        public let jobFlowIds: [String]?
        /// A Boolean that indicates whether to terminate the cluster after all steps are executed.
        public let keepJobFlowAliveWhenNoSteps: Bool?

        @inlinable
        public init(jobFlowIds: [String]? = nil, keepJobFlowAliveWhenNoSteps: Bool? = nil) {
            self.jobFlowIds = jobFlowIds
            self.keepJobFlowAliveWhenNoSteps = keepJobFlowAliveWhenNoSteps
        }

        public func validate(name: String) throws {
            try self.jobFlowIds?.forEach {
                try validate($0, name: "jobFlowIds[]", parent: name, max: 10280)
                try validate($0, name: "jobFlowIds[]", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case jobFlowIds = "JobFlowIds"
            case keepJobFlowAliveWhenNoSteps = "KeepJobFlowAliveWhenNoSteps"
        }
    }

    public struct SetTerminationProtectionInput: AWSEncodableShape {
        ///  A list of strings that uniquely identify the clusters to protect. This identifier is returned by RunJobFlow and can also be obtained from DescribeJobFlows .
        public let jobFlowIds: [String]?
        /// A Boolean that indicates whether to protect the cluster and prevent the Amazon EC2 instances in the cluster from shutting down due to API calls, user intervention, or job-flow error.
        public let terminationProtected: Bool?

        @inlinable
        public init(jobFlowIds: [String]? = nil, terminationProtected: Bool? = nil) {
            self.jobFlowIds = jobFlowIds
            self.terminationProtected = terminationProtected
        }

        public func validate(name: String) throws {
            try self.jobFlowIds?.forEach {
                try validate($0, name: "jobFlowIds[]", parent: name, max: 10280)
                try validate($0, name: "jobFlowIds[]", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case jobFlowIds = "JobFlowIds"
            case terminationProtected = "TerminationProtected"
        }
    }

    public struct SetUnhealthyNodeReplacementInput: AWSEncodableShape {
        /// The list of strings that uniquely identify the clusters for which to turn on  unhealthy node replacement. You can get these identifiers by running the  RunJobFlow or the DescribeJobFlows operations.
        public let jobFlowIds: [String]?
        /// Indicates whether to turn on or turn off graceful unhealthy node replacement.
        public let unhealthyNodeReplacement: Bool?

        @inlinable
        public init(jobFlowIds: [String]? = nil, unhealthyNodeReplacement: Bool? = nil) {
            self.jobFlowIds = jobFlowIds
            self.unhealthyNodeReplacement = unhealthyNodeReplacement
        }

        public func validate(name: String) throws {
            try self.jobFlowIds?.forEach {
                try validate($0, name: "jobFlowIds[]", parent: name, max: 10280)
                try validate($0, name: "jobFlowIds[]", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case jobFlowIds = "JobFlowIds"
            case unhealthyNodeReplacement = "UnhealthyNodeReplacement"
        }
    }

    public struct SetVisibleToAllUsersInput: AWSEncodableShape {
        /// The unique identifier of the job flow (cluster).
        public let jobFlowIds: [String]?
        /// A value of true indicates that an IAM principal in the Amazon Web Services account can perform Amazon EMR actions on the cluster that the IAM policies attached to the principal allow. A value of false indicates that only the IAM principal that created the cluster and the Amazon Web Services root user can perform Amazon EMR actions on the cluster.
        public let visibleToAllUsers: Bool?

        @inlinable
        public init(jobFlowIds: [String]? = nil, visibleToAllUsers: Bool? = nil) {
            self.jobFlowIds = jobFlowIds
            self.visibleToAllUsers = visibleToAllUsers
        }

        public func validate(name: String) throws {
            try self.jobFlowIds?.forEach {
                try validate($0, name: "jobFlowIds[]", parent: name, max: 10280)
                try validate($0, name: "jobFlowIds[]", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case jobFlowIds = "JobFlowIds"
            case visibleToAllUsers = "VisibleToAllUsers"
        }
    }

    public struct ShrinkPolicy: AWSEncodableShape & AWSDecodableShape {
        /// The desired timeout for decommissioning an instance. Overrides the default YARN decommissioning timeout.
        public let decommissionTimeout: Int?
        /// Custom policy for requesting termination protection or termination of specific instances when shrinking an instance group.
        public let instanceResizePolicy: InstanceResizePolicy?

        @inlinable
        public init(decommissionTimeout: Int? = nil, instanceResizePolicy: InstanceResizePolicy? = nil) {
            self.decommissionTimeout = decommissionTimeout
            self.instanceResizePolicy = instanceResizePolicy
        }

        private enum CodingKeys: String, CodingKey {
            case decommissionTimeout = "DecommissionTimeout"
            case instanceResizePolicy = "InstanceResizePolicy"
        }
    }

    public struct SimpleScalingPolicyConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The way in which Amazon EC2 instances are added (if ScalingAdjustment is a positive number) or terminated (if ScalingAdjustment is a negative number) each time the scaling activity is triggered. CHANGE_IN_CAPACITY is the default. CHANGE_IN_CAPACITY indicates that the Amazon EC2 instance count increments or decrements by ScalingAdjustment, which should be expressed as an integer. PERCENT_CHANGE_IN_CAPACITY indicates the instance count increments or decrements by the percentage specified by ScalingAdjustment, which should be expressed as an integer. For example, 20 indicates an increase in 20% increments of cluster capacity. EXACT_CAPACITY indicates the scaling activity results in an instance group with the number of Amazon EC2 instances specified by ScalingAdjustment, which should be expressed as a positive integer.
        public let adjustmentType: AdjustmentType?
        /// The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start. The default value is 0.
        public let coolDown: Int?
        /// The amount by which to scale in or scale out, based on the specified AdjustmentType. A positive value adds to the instance group's Amazon EC2 instance count while a negative number removes instances. If AdjustmentType is set to EXACT_CAPACITY, the number should only be a positive integer. If AdjustmentType is set to PERCENT_CHANGE_IN_CAPACITY, the value should express the percentage as an integer. For example, -20 indicates a decrease in 20% increments of cluster capacity.
        public let scalingAdjustment: Int?

        @inlinable
        public init(adjustmentType: AdjustmentType? = nil, coolDown: Int? = nil, scalingAdjustment: Int? = nil) {
            self.adjustmentType = adjustmentType
            self.coolDown = coolDown
            self.scalingAdjustment = scalingAdjustment
        }

        private enum CodingKeys: String, CodingKey {
            case adjustmentType = "AdjustmentType"
            case coolDown = "CoolDown"
            case scalingAdjustment = "ScalingAdjustment"
        }
    }

    public struct SimplifiedApplication: AWSDecodableShape {
        /// The returned release label application name. For example, hadoop.
        public let name: String?
        /// The returned release label application version. For example, 3.2.1.
        public let version: String?

        @inlinable
        public init(name: String? = nil, version: String? = nil) {
            self.name = name
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case version = "Version"
        }
    }

    public struct SpotProvisioningSpecification: AWSEncodableShape & AWSDecodableShape {
        /// Specifies one of the following strategies to launch Spot Instance fleets:  capacity-optimized, price-capacity-optimized, lowest-price, or   diversified, and capacity-optimized-prioritized. For more information on the provisioning strategies, see Allocation strategies for Spot Instances in the Amazon EC2 User Guide for Linux Instances.  When you launch a Spot Instance fleet with the old console, it automatically launches with the capacity-optimized strategy. You can't change the allocation strategy from the old console.
        public let allocationStrategy: SpotProvisioningAllocationStrategy?
        /// The defined duration for Spot Instances (also known as Spot blocks) in minutes. When specified, the Spot Instance does not terminate before the defined duration expires, and defined duration pricing for Spot Instances applies. Valid values are 60, 120, 180, 240, 300, or 360. The duration period starts as soon as a Spot Instance receives its instance ID. At the end of the duration, Amazon EC2 marks the Spot Instance for termination and provides a Spot Instance termination notice, which gives the instance a two-minute warning before it terminates.   Spot Instances with a defined duration (also known as Spot blocks) are no longer available to new customers from July 1, 2021. For customers who have previously used the feature, we will continue to support Spot Instances with a defined duration until December 31, 2022.
        public let blockDurationMinutes: Int?
        /// The action to take when TargetSpotCapacity has not been fulfilled when the TimeoutDurationMinutes has expired; that is, when all Spot Instances could not be provisioned within the Spot provisioning timeout. Valid values are TERMINATE_CLUSTER and SWITCH_TO_ON_DEMAND. SWITCH_TO_ON_DEMAND specifies that if no Spot Instances are available, On-Demand Instances should be provisioned to fulfill any remaining Spot capacity.
        public let timeoutAction: SpotProvisioningTimeoutAction?
        /// The Spot provisioning timeout period in minutes. If Spot Instances are not provisioned within this time period, the TimeOutAction is taken. Minimum value is 5 and maximum value is 1440. The timeout applies only during initial provisioning, when the cluster is first created.
        public let timeoutDurationMinutes: Int?

        @inlinable
        public init(allocationStrategy: SpotProvisioningAllocationStrategy? = nil, blockDurationMinutes: Int? = nil, timeoutAction: SpotProvisioningTimeoutAction? = nil, timeoutDurationMinutes: Int? = nil) {
            self.allocationStrategy = allocationStrategy
            self.blockDurationMinutes = blockDurationMinutes
            self.timeoutAction = timeoutAction
            self.timeoutDurationMinutes = timeoutDurationMinutes
        }

        public func validate(name: String) throws {
            try self.validate(self.blockDurationMinutes, name: "blockDurationMinutes", parent: name, min: 0)
            try self.validate(self.timeoutDurationMinutes, name: "timeoutDurationMinutes", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case allocationStrategy = "AllocationStrategy"
            case blockDurationMinutes = "BlockDurationMinutes"
            case timeoutAction = "TimeoutAction"
            case timeoutDurationMinutes = "TimeoutDurationMinutes"
        }
    }

    public struct SpotResizingSpecification: AWSEncodableShape & AWSDecodableShape {
        /// Specifies the allocation strategy to use to launch Spot instances during a resize. If you run Amazon EMR releases 6.9.0 or higher, the default is price-capacity-optimized. If you run Amazon EMR releases 6.8.0 or lower, the default is capacity-optimized.
        public let allocationStrategy: SpotProvisioningAllocationStrategy?
        /// Spot resize timeout in minutes. If Spot Instances are not provisioned within this time, the resize workflow will stop provisioning of Spot instances. Minimum value is 5 minutes and maximum value is 10,080 minutes (7 days). The timeout applies to all resize workflows on the Instance Fleet. The resize could be triggered by Amazon EMR Managed Scaling or by the customer (via Amazon EMR Console, Amazon EMR CLI modify-instance-fleet or Amazon EMR SDK ModifyInstanceFleet API) or by Amazon EMR due to Amazon EC2 Spot Reclamation.
        public let timeoutDurationMinutes: Int?

        @inlinable
        public init(allocationStrategy: SpotProvisioningAllocationStrategy? = nil, timeoutDurationMinutes: Int? = nil) {
            self.allocationStrategy = allocationStrategy
            self.timeoutDurationMinutes = timeoutDurationMinutes
        }

        public func validate(name: String) throws {
            try self.validate(self.timeoutDurationMinutes, name: "timeoutDurationMinutes", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case allocationStrategy = "AllocationStrategy"
            case timeoutDurationMinutes = "TimeoutDurationMinutes"
        }
    }

    public struct StartNotebookExecutionInput: AWSEncodableShape {
        /// The unique identifier of the Amazon EMR Notebook to use for notebook execution.
        public let editorId: String?
        /// The environment variables associated with the notebook execution.
        public let environmentVariables: [String: String]?
        /// Specifies the execution engine (cluster) that runs the notebook execution.
        public let executionEngine: ExecutionEngineConfig?
        /// An optional name for the notebook execution.
        public let notebookExecutionName: String?
        /// The unique identifier of the Amazon EC2 security group to associate with the Amazon EMR Notebook for this notebook execution.
        public let notebookInstanceSecurityGroupId: String?
        /// Input parameters in JSON format passed to the Amazon EMR Notebook at runtime for execution.
        public let notebookParams: String?
        /// The Amazon S3 location for the notebook execution input.
        public let notebookS3Location: NotebookS3LocationFromInput?
        /// The output format for the notebook execution.
        public let outputNotebookFormat: OutputNotebookFormat?
        /// The Amazon S3 location for the notebook execution output.
        public let outputNotebookS3Location: OutputNotebookS3LocationFromInput?
        /// The path and file name of the notebook file for this execution, relative to the path specified for the Amazon EMR Notebook. For example, if you specify a path of s3://MyBucket/MyNotebooks when you create an Amazon EMR Notebook for a notebook with an ID of e-ABCDEFGHIJK1234567890ABCD (the EditorID of this request), and you specify a RelativePath of my_notebook_executions/notebook_execution.ipynb, the location of the file for the notebook execution is s3://MyBucket/MyNotebooks/e-ABCDEFGHIJK1234567890ABCD/my_notebook_executions/notebook_execution.ipynb.
        public let relativePath: String?
        /// The name or ARN of the IAM role that is used as the service role for Amazon EMR (the Amazon EMR role) for the notebook execution.
        public let serviceRole: String?
        /// A list of tags associated with a notebook execution. Tags are user-defined key-value pairs that consist of a required key string with a maximum of 128 characters and an optional value string with a maximum of 256 characters.
        public let tags: [Tag]?

        @inlinable
        public init(editorId: String? = nil, environmentVariables: [String: String]? = nil, executionEngine: ExecutionEngineConfig? = nil, notebookExecutionName: String? = nil, notebookInstanceSecurityGroupId: String? = nil, notebookParams: String? = nil, notebookS3Location: NotebookS3LocationFromInput? = nil, outputNotebookFormat: OutputNotebookFormat? = nil, outputNotebookS3Location: OutputNotebookS3LocationFromInput? = nil, relativePath: String? = nil, serviceRole: String? = nil, tags: [Tag]? = nil) {
            self.editorId = editorId
            self.environmentVariables = environmentVariables
            self.executionEngine = executionEngine
            self.notebookExecutionName = notebookExecutionName
            self.notebookInstanceSecurityGroupId = notebookInstanceSecurityGroupId
            self.notebookParams = notebookParams
            self.notebookS3Location = notebookS3Location
            self.outputNotebookFormat = outputNotebookFormat
            self.outputNotebookS3Location = outputNotebookS3Location
            self.relativePath = relativePath
            self.serviceRole = serviceRole
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.editorId, name: "editorId", parent: name, max: 256)
            try self.validate(self.editorId, name: "editorId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.environmentVariables?.forEach {
                try validate($0.key, name: "environmentVariables.key", parent: name, max: 256)
                try validate($0.key, name: "environmentVariables.key", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
                try validate($0.value, name: "environmentVariables[\"\($0.key)\"]", parent: name, max: 10280)
                try validate($0.value, name: "environmentVariables[\"\($0.key)\"]", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            }
            try self.executionEngine?.validate(name: "\(name).executionEngine")
            try self.validate(self.notebookExecutionName, name: "notebookExecutionName", parent: name, max: 256)
            try self.validate(self.notebookExecutionName, name: "notebookExecutionName", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.notebookInstanceSecurityGroupId, name: "notebookInstanceSecurityGroupId", parent: name, max: 256)
            try self.validate(self.notebookInstanceSecurityGroupId, name: "notebookInstanceSecurityGroupId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.notebookParams, name: "notebookParams", parent: name, max: 10280)
            try self.validate(self.notebookParams, name: "notebookParams", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.notebookS3Location?.validate(name: "\(name).notebookS3Location")
            try self.outputNotebookS3Location?.validate(name: "\(name).outputNotebookS3Location")
            try self.validate(self.relativePath, name: "relativePath", parent: name, max: 10280)
            try self.validate(self.relativePath, name: "relativePath", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.serviceRole, name: "serviceRole", parent: name, max: 10280)
            try self.validate(self.serviceRole, name: "serviceRole", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case editorId = "EditorId"
            case environmentVariables = "EnvironmentVariables"
            case executionEngine = "ExecutionEngine"
            case notebookExecutionName = "NotebookExecutionName"
            case notebookInstanceSecurityGroupId = "NotebookInstanceSecurityGroupId"
            case notebookParams = "NotebookParams"
            case notebookS3Location = "NotebookS3Location"
            case outputNotebookFormat = "OutputNotebookFormat"
            case outputNotebookS3Location = "OutputNotebookS3Location"
            case relativePath = "RelativePath"
            case serviceRole = "ServiceRole"
            case tags = "Tags"
        }
    }

    public struct StartNotebookExecutionOutput: AWSDecodableShape {
        /// The unique identifier of the notebook execution.
        public let notebookExecutionId: String?

        @inlinable
        public init(notebookExecutionId: String? = nil) {
            self.notebookExecutionId = notebookExecutionId
        }

        private enum CodingKeys: String, CodingKey {
            case notebookExecutionId = "NotebookExecutionId"
        }
    }

    public struct Step: AWSDecodableShape {
        /// The action to take when the cluster step fails. Possible values are TERMINATE_CLUSTER, CANCEL_AND_WAIT, and CONTINUE. TERMINATE_JOB_FLOW is provided for backward compatibility. We recommend using TERMINATE_CLUSTER instead. If a cluster's StepConcurrencyLevel is greater than 1, do not use AddJobFlowSteps to submit a step with this parameter set to CANCEL_AND_WAIT or TERMINATE_CLUSTER. The step is not submitted and the action fails with a message that the ActionOnFailure setting is not valid. If you change a cluster's StepConcurrencyLevel to be greater than 1 while a step is running, the ActionOnFailure parameter may not behave as you expect. In this case, for a step that fails with this parameter set to CANCEL_AND_WAIT, pending steps and the running step are not canceled; for a step that fails with this parameter set to TERMINATE_CLUSTER, the cluster does not terminate.
        public let actionOnFailure: ActionOnFailure?
        /// The Hadoop job configuration of the cluster step.
        public let config: HadoopStepConfig?
        /// The Amazon Resource Name (ARN) of the runtime role for a step on the cluster. The runtime role can be a cross-account IAM role. The runtime role ARN is a combination of account ID, role name, and role type using the following format: arn:partition:service:region:account:resource.  For example, arn:aws:IAM::1234567890:role/ReadOnly is a correctly formatted runtime role ARN.
        public let executionRoleArn: String?
        /// The identifier of the cluster step.
        public let id: String?
        /// The name of the cluster step.
        public let name: String?
        /// The current execution status details of the cluster step.
        public let status: StepStatus?

        @inlinable
        public init(actionOnFailure: ActionOnFailure? = nil, config: HadoopStepConfig? = nil, executionRoleArn: String? = nil, id: String? = nil, name: String? = nil, status: StepStatus? = nil) {
            self.actionOnFailure = actionOnFailure
            self.config = config
            self.executionRoleArn = executionRoleArn
            self.id = id
            self.name = name
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case actionOnFailure = "ActionOnFailure"
            case config = "Config"
            case executionRoleArn = "ExecutionRoleArn"
            case id = "Id"
            case name = "Name"
            case status = "Status"
        }
    }

    public struct StepConfig: AWSEncodableShape & AWSDecodableShape {
        /// The action to take when the step fails. Use one of the following values:    TERMINATE_CLUSTER - Shuts down the cluster.    CANCEL_AND_WAIT - Cancels any pending steps and returns the cluster to the WAITING state.    CONTINUE - Continues to the next step in the queue.    TERMINATE_JOB_FLOW - Shuts down the cluster. TERMINATE_JOB_FLOW is provided for backward compatibility. We recommend using TERMINATE_CLUSTER instead.   If a cluster's StepConcurrencyLevel is greater than 1, do not use AddJobFlowSteps to submit a step with this parameter set to CANCEL_AND_WAIT or TERMINATE_CLUSTER. The step is not submitted and the action fails with a message that the ActionOnFailure setting is not valid. If you change a cluster's StepConcurrencyLevel to be greater than 1 while a step is running, the ActionOnFailure parameter may not behave as you expect. In this case, for a step that fails with this parameter set to CANCEL_AND_WAIT, pending steps and the running step are not canceled; for a step that fails with this parameter set to TERMINATE_CLUSTER, the cluster does not terminate.
        public let actionOnFailure: ActionOnFailure?
        /// The JAR file used for the step.
        public let hadoopJarStep: HadoopJarStepConfig?
        /// The name of the step.
        public let name: String?

        @inlinable
        public init(actionOnFailure: ActionOnFailure? = nil, hadoopJarStep: HadoopJarStepConfig? = nil, name: String? = nil) {
            self.actionOnFailure = actionOnFailure
            self.hadoopJarStep = hadoopJarStep
            self.name = name
        }

        public func validate(name: String) throws {
            try self.hadoopJarStep?.validate(name: "\(name).hadoopJarStep")
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case actionOnFailure = "ActionOnFailure"
            case hadoopJarStep = "HadoopJarStep"
            case name = "Name"
        }
    }

    public struct StepDetail: AWSDecodableShape {
        /// The description of the step status.
        public let executionStatusDetail: StepExecutionStatusDetail?
        /// The step configuration.
        public let stepConfig: StepConfig?

        @inlinable
        public init(executionStatusDetail: StepExecutionStatusDetail? = nil, stepConfig: StepConfig? = nil) {
            self.executionStatusDetail = executionStatusDetail
            self.stepConfig = stepConfig
        }

        private enum CodingKeys: String, CodingKey {
            case executionStatusDetail = "ExecutionStatusDetail"
            case stepConfig = "StepConfig"
        }
    }

    public struct StepExecutionStatusDetail: AWSDecodableShape {
        /// The creation date and time of the step.
        public let creationDateTime: Date?
        /// The completion date and time of the step.
        public let endDateTime: Date?
        /// A description of the step's current state.
        public let lastStateChangeReason: String?
        /// The start date and time of the step.
        public let startDateTime: Date?
        /// The state of the step.
        public let state: StepExecutionState?

        @inlinable
        public init(creationDateTime: Date? = nil, endDateTime: Date? = nil, lastStateChangeReason: String? = nil, startDateTime: Date? = nil, state: StepExecutionState? = nil) {
            self.creationDateTime = creationDateTime
            self.endDateTime = endDateTime
            self.lastStateChangeReason = lastStateChangeReason
            self.startDateTime = startDateTime
            self.state = state
        }

        private enum CodingKeys: String, CodingKey {
            case creationDateTime = "CreationDateTime"
            case endDateTime = "EndDateTime"
            case lastStateChangeReason = "LastStateChangeReason"
            case startDateTime = "StartDateTime"
            case state = "State"
        }
    }

    public struct StepStateChangeReason: AWSDecodableShape {
        /// The programmable code for the state change reason. Note: Currently, the service provides no code for the state change.
        public let code: StepStateChangeReasonCode?
        /// The descriptive message for the state change reason.
        public let message: String?

        @inlinable
        public init(code: StepStateChangeReasonCode? = nil, message: String? = nil) {
            self.code = code
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case code = "Code"
            case message = "Message"
        }
    }

    public struct StepStatus: AWSDecodableShape {
        /// The details for the step failure including reason, message, and log file path where the root cause was identified.
        public let failureDetails: FailureDetails?
        /// The execution state of the cluster step.
        public let state: StepState?
        /// The reason for the step execution status change.
        public let stateChangeReason: StepStateChangeReason?
        /// The timeline of the cluster step status over time.
        public let timeline: StepTimeline?

        @inlinable
        public init(failureDetails: FailureDetails? = nil, state: StepState? = nil, stateChangeReason: StepStateChangeReason? = nil, timeline: StepTimeline? = nil) {
            self.failureDetails = failureDetails
            self.state = state
            self.stateChangeReason = stateChangeReason
            self.timeline = timeline
        }

        private enum CodingKeys: String, CodingKey {
            case failureDetails = "FailureDetails"
            case state = "State"
            case stateChangeReason = "StateChangeReason"
            case timeline = "Timeline"
        }
    }

    public struct StepSummary: AWSDecodableShape {
        /// The action to take when the cluster step fails. Possible values are TERMINATE_CLUSTER, CANCEL_AND_WAIT, and CONTINUE. TERMINATE_JOB_FLOW is available for backward compatibility.
        public let actionOnFailure: ActionOnFailure?
        /// The Hadoop job configuration of the cluster step.
        public let config: HadoopStepConfig?
        /// The identifier of the cluster step.
        public let id: String?
        /// The name of the cluster step.
        public let name: String?
        /// The current execution status details of the cluster step.
        public let status: StepStatus?

        @inlinable
        public init(actionOnFailure: ActionOnFailure? = nil, config: HadoopStepConfig? = nil, id: String? = nil, name: String? = nil, status: StepStatus? = nil) {
            self.actionOnFailure = actionOnFailure
            self.config = config
            self.id = id
            self.name = name
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case actionOnFailure = "ActionOnFailure"
            case config = "Config"
            case id = "Id"
            case name = "Name"
            case status = "Status"
        }
    }

    public struct StepTimeline: AWSDecodableShape {
        /// The date and time when the cluster step was created.
        public let creationDateTime: Date?
        /// The date and time when the cluster step execution completed or failed.
        public let endDateTime: Date?
        /// The date and time when the cluster step execution started.
        public let startDateTime: Date?

        @inlinable
        public init(creationDateTime: Date? = nil, endDateTime: Date? = nil, startDateTime: Date? = nil) {
            self.creationDateTime = creationDateTime
            self.endDateTime = endDateTime
            self.startDateTime = startDateTime
        }

        private enum CodingKeys: String, CodingKey {
            case creationDateTime = "CreationDateTime"
            case endDateTime = "EndDateTime"
            case startDateTime = "StartDateTime"
        }
    }

    public struct StopNotebookExecutionInput: AWSEncodableShape {
        /// The unique identifier of the notebook execution.
        public let notebookExecutionId: String?

        @inlinable
        public init(notebookExecutionId: String? = nil) {
            self.notebookExecutionId = notebookExecutionId
        }

        public func validate(name: String) throws {
            try self.validate(self.notebookExecutionId, name: "notebookExecutionId", parent: name, max: 256)
            try self.validate(self.notebookExecutionId, name: "notebookExecutionId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case notebookExecutionId = "NotebookExecutionId"
        }
    }

    public struct Studio: AWSDecodableShape {
        /// Specifies whether the Amazon EMR Studio authenticates users with IAM or IAM Identity Center.
        public let authMode: AuthMode?
        /// The time the Amazon EMR Studio was created.
        public let creationTime: Date?
        /// The Amazon S3 location to back up Amazon EMR Studio Workspaces and notebook files.
        public let defaultS3Location: String?
        /// The detailed description of the Amazon EMR Studio.
        public let description: String?
        /// The KMS key identifier (ARN) used to encrypt Amazon EMR Studio workspace and notebook files when backed up to Amazon S3.
        public let encryptionKeyArn: String?
        /// The ID of the Engine security group associated with the Amazon EMR Studio. The Engine security group allows inbound network traffic from resources in the Workspace security group.
        public let engineSecurityGroupId: String?
        ///  The ARN of the IAM Identity Center instance the Studio application belongs to.
        public let idcInstanceArn: String?
        ///  Indicates whether the Studio has REQUIRED or OPTIONAL IAM Identity Center user assignment. If the value is set to REQUIRED, users must be explicitly assigned to the Studio application to access the Studio.
        public let idcUserAssignment: IdcUserAssignment?
        /// Your identity provider's authentication endpoint. Amazon EMR Studio redirects federated users to this endpoint for authentication when logging in to a Studio with the Studio URL.
        public let idpAuthUrl: String?
        /// The name of your identity provider's RelayState parameter.
        public let idpRelayStateParameterName: String?
        /// The name of the Amazon EMR Studio.
        public let name: String?
        /// The name of the IAM role assumed by the Amazon EMR Studio.
        public let serviceRole: String?
        /// The Amazon Resource Name (ARN) of the Amazon EMR Studio.
        public let studioArn: String?
        /// The ID of the Amazon EMR Studio.
        public let studioId: String?
        /// The list of IDs of the subnets associated with the Amazon EMR Studio.
        public let subnetIds: [String]?
        /// A list of tags associated with the Amazon EMR Studio.
        public let tags: [Tag]?
        ///  Indicates whether the Studio has Trusted identity propagation enabled. The default value is false.
        public let trustedIdentityPropagationEnabled: Bool?
        /// The unique access URL of the Amazon EMR Studio.
        public let url: String?
        /// The name of the IAM role assumed by users logged in to the Amazon EMR Studio. A Studio only requires a UserRole when you use IAM authentication.
        public let userRole: String?
        /// The ID of the VPC associated with the Amazon EMR Studio.
        public let vpcId: String?
        /// The ID of the Workspace security group associated with the Amazon EMR Studio. The Workspace security group allows outbound network traffic to resources in the Engine security group and to the internet.
        public let workspaceSecurityGroupId: String?

        @inlinable
        public init(authMode: AuthMode? = nil, creationTime: Date? = nil, defaultS3Location: String? = nil, description: String? = nil, encryptionKeyArn: String? = nil, engineSecurityGroupId: String? = nil, idcInstanceArn: String? = nil, idcUserAssignment: IdcUserAssignment? = nil, idpAuthUrl: String? = nil, idpRelayStateParameterName: String? = nil, name: String? = nil, serviceRole: String? = nil, studioArn: String? = nil, studioId: String? = nil, subnetIds: [String]? = nil, tags: [Tag]? = nil, trustedIdentityPropagationEnabled: Bool? = nil, url: String? = nil, userRole: String? = nil, vpcId: String? = nil, workspaceSecurityGroupId: String? = nil) {
            self.authMode = authMode
            self.creationTime = creationTime
            self.defaultS3Location = defaultS3Location
            self.description = description
            self.encryptionKeyArn = encryptionKeyArn
            self.engineSecurityGroupId = engineSecurityGroupId
            self.idcInstanceArn = idcInstanceArn
            self.idcUserAssignment = idcUserAssignment
            self.idpAuthUrl = idpAuthUrl
            self.idpRelayStateParameterName = idpRelayStateParameterName
            self.name = name
            self.serviceRole = serviceRole
            self.studioArn = studioArn
            self.studioId = studioId
            self.subnetIds = subnetIds
            self.tags = tags
            self.trustedIdentityPropagationEnabled = trustedIdentityPropagationEnabled
            self.url = url
            self.userRole = userRole
            self.vpcId = vpcId
            self.workspaceSecurityGroupId = workspaceSecurityGroupId
        }

        private enum CodingKeys: String, CodingKey {
            case authMode = "AuthMode"
            case creationTime = "CreationTime"
            case defaultS3Location = "DefaultS3Location"
            case description = "Description"
            case encryptionKeyArn = "EncryptionKeyArn"
            case engineSecurityGroupId = "EngineSecurityGroupId"
            case idcInstanceArn = "IdcInstanceArn"
            case idcUserAssignment = "IdcUserAssignment"
            case idpAuthUrl = "IdpAuthUrl"
            case idpRelayStateParameterName = "IdpRelayStateParameterName"
            case name = "Name"
            case serviceRole = "ServiceRole"
            case studioArn = "StudioArn"
            case studioId = "StudioId"
            case subnetIds = "SubnetIds"
            case tags = "Tags"
            case trustedIdentityPropagationEnabled = "TrustedIdentityPropagationEnabled"
            case url = "Url"
            case userRole = "UserRole"
            case vpcId = "VpcId"
            case workspaceSecurityGroupId = "WorkspaceSecurityGroupId"
        }
    }

    public struct StudioSummary: AWSDecodableShape {
        /// Specifies whether the Studio authenticates users using IAM or IAM Identity Center.
        public let authMode: AuthMode?
        /// The time when the Amazon EMR Studio was created.
        public let creationTime: Date?
        /// The detailed description of the Amazon EMR Studio.
        public let description: String?
        /// The name of the Amazon EMR Studio.
        public let name: String?
        /// The ID of the Amazon EMR Studio.
        public let studioId: String?
        /// The unique access URL of the Amazon EMR Studio.
        public let url: String?
        /// The ID of the Virtual Private Cloud (Amazon VPC) associated with the Amazon EMR Studio.
        public let vpcId: String?

        @inlinable
        public init(authMode: AuthMode? = nil, creationTime: Date? = nil, description: String? = nil, name: String? = nil, studioId: String? = nil, url: String? = nil, vpcId: String? = nil) {
            self.authMode = authMode
            self.creationTime = creationTime
            self.description = description
            self.name = name
            self.studioId = studioId
            self.url = url
            self.vpcId = vpcId
        }

        private enum CodingKeys: String, CodingKey {
            case authMode = "AuthMode"
            case creationTime = "CreationTime"
            case description = "Description"
            case name = "Name"
            case studioId = "StudioId"
            case url = "Url"
            case vpcId = "VpcId"
        }
    }

    public struct SupportedInstanceType: AWSDecodableShape {
        /// The CPU architecture, for example X86_64 or AARCH64.
        public let architecture: String?
        /// Indicates whether the SupportedInstanceType supports Amazon EBS optimization.
        public let ebsOptimizedAvailable: Bool?
        /// Indicates whether the SupportedInstanceType uses Amazon EBS optimization by default.
        public let ebsOptimizedByDefault: Bool?
        /// Indicates whether the SupportedInstanceType only supports Amazon EBS.
        public let ebsStorageOnly: Bool?
        /// The Amazon EC2 family and generation for the SupportedInstanceType.
        public let instanceFamilyId: String?
        /// Indicates whether the SupportedInstanceType only supports 64-bit architecture.
        public let is64BitsOnly: Bool?
        /// The amount of memory that is available to Amazon EMR from the SupportedInstanceType. The kernel and hypervisor software consume some memory, so this value might be lower than the overall memory for the instance type.
        public let memoryGB: Float?
        /// Number of disks for the SupportedInstanceType. This value is 0 for Amazon EBS-only instance types.
        public let numberOfDisks: Int?
        ///  StorageGB represents the storage capacity of the SupportedInstanceType. This value is 0 for Amazon EBS-only instance types.
        public let storageGB: Int?
        /// The Amazon EC2 instance type, for example m5.xlarge, of the SupportedInstanceType.
        public let type: String?
        /// The number of vCPUs available for the SupportedInstanceType.
        public let vcpu: Int?

        @inlinable
        public init(architecture: String? = nil, ebsOptimizedAvailable: Bool? = nil, ebsOptimizedByDefault: Bool? = nil, ebsStorageOnly: Bool? = nil, instanceFamilyId: String? = nil, is64BitsOnly: Bool? = nil, memoryGB: Float? = nil, numberOfDisks: Int? = nil, storageGB: Int? = nil, type: String? = nil, vcpu: Int? = nil) {
            self.architecture = architecture
            self.ebsOptimizedAvailable = ebsOptimizedAvailable
            self.ebsOptimizedByDefault = ebsOptimizedByDefault
            self.ebsStorageOnly = ebsStorageOnly
            self.instanceFamilyId = instanceFamilyId
            self.is64BitsOnly = is64BitsOnly
            self.memoryGB = memoryGB
            self.numberOfDisks = numberOfDisks
            self.storageGB = storageGB
            self.type = type
            self.vcpu = vcpu
        }

        private enum CodingKeys: String, CodingKey {
            case architecture = "Architecture"
            case ebsOptimizedAvailable = "EbsOptimizedAvailable"
            case ebsOptimizedByDefault = "EbsOptimizedByDefault"
            case ebsStorageOnly = "EbsStorageOnly"
            case instanceFamilyId = "InstanceFamilyId"
            case is64BitsOnly = "Is64BitsOnly"
            case memoryGB = "MemoryGB"
            case numberOfDisks = "NumberOfDisks"
            case storageGB = "StorageGB"
            case type = "Type"
            case vcpu = "VCPU"
        }
    }

    public struct SupportedProductConfig: AWSEncodableShape {
        /// The list of user-supplied arguments.
        public let args: [String]?
        /// The name of the product configuration.
        public let name: String?

        @inlinable
        public init(args: [String]? = nil, name: String? = nil) {
            self.args = args
            self.name = name
        }

        public func validate(name: String) throws {
            try self.args?.forEach {
                try validate($0, name: "args[]", parent: name, max: 10280)
                try validate($0, name: "args[]", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            }
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case args = "Args"
            case name = "Name"
        }
    }

    public struct Tag: AWSEncodableShape & AWSDecodableShape {
        /// A user-defined key, which is the minimum required information for a valid tag. For more information, see Tag.
        public let key: String?
        /// A user-defined value, which is optional in a tag. For more information, see Tag Clusters.
        public let value: String?

        @inlinable
        public init(key: String? = nil, value: String? = nil) {
            self.key = key
            self.value = value
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case value = "Value"
        }
    }

    public struct TerminateJobFlowsInput: AWSEncodableShape {
        /// A list of job flows to be shut down.
        public let jobFlowIds: [String]?

        @inlinable
        public init(jobFlowIds: [String]? = nil) {
            self.jobFlowIds = jobFlowIds
        }

        public func validate(name: String) throws {
            try self.jobFlowIds?.forEach {
                try validate($0, name: "jobFlowIds[]", parent: name, max: 10280)
                try validate($0, name: "jobFlowIds[]", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case jobFlowIds = "JobFlowIds"
        }
    }

    public struct UpdateStudioInput: AWSEncodableShape {
        /// The Amazon S3 location to back up Workspaces and notebook files for the Amazon EMR Studio.
        public let defaultS3Location: String?
        /// A detailed description to assign to the Amazon EMR Studio.
        public let description: String?
        /// The KMS key identifier (ARN) used to encrypt Amazon EMR Studio workspace and notebook files when backed up to Amazon S3.
        public let encryptionKeyArn: String?
        /// A descriptive name for the Amazon EMR Studio.
        public let name: String?
        /// The ID of the Amazon EMR Studio to update.
        public let studioId: String?
        /// A list of subnet IDs to associate with the Amazon EMR Studio. The list can include new subnet IDs, but must also include all of the subnet IDs previously associated with the Studio. The list order does not matter. A Studio can have a maximum of 5 subnets. The subnets must belong to the same VPC as the Studio.
        public let subnetIds: [String]?

        @inlinable
        public init(defaultS3Location: String? = nil, description: String? = nil, encryptionKeyArn: String? = nil, name: String? = nil, studioId: String? = nil, subnetIds: [String]? = nil) {
            self.defaultS3Location = defaultS3Location
            self.description = description
            self.encryptionKeyArn = encryptionKeyArn
            self.name = name
            self.studioId = studioId
            self.subnetIds = subnetIds
        }

        public func validate(name: String) throws {
            try self.validate(self.defaultS3Location, name: "defaultS3Location", parent: name, max: 10280)
            try self.validate(self.defaultS3Location, name: "defaultS3Location", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.description, name: "description", parent: name, max: 256)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.encryptionKeyArn, name: "encryptionKeyArn", parent: name, max: 10280)
            try self.validate(self.encryptionKeyArn, name: "encryptionKeyArn", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.studioId, name: "studioId", parent: name, max: 256)
            try self.validate(self.studioId, name: "studioId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case defaultS3Location = "DefaultS3Location"
            case description = "Description"
            case encryptionKeyArn = "EncryptionKeyArn"
            case name = "Name"
            case studioId = "StudioId"
            case subnetIds = "SubnetIds"
        }
    }

    public struct UpdateStudioSessionMappingInput: AWSEncodableShape {
        /// The globally unique identifier (GUID) of the user or group. For more information, see UserId and GroupId in the IAM Identity Center Identity Store API Reference. Either IdentityName or IdentityId must be specified.
        public let identityId: String?
        /// The name of the user or group to update. For more information, see UserName and DisplayName in the IAM Identity Center Identity Store API Reference. Either IdentityName or IdentityId must be specified.
        public let identityName: String?
        /// Specifies whether the identity to update is a user or a group.
        public let identityType: IdentityType?
        /// The Amazon Resource Name (ARN) of the session policy to associate with the specified user or group.
        public let sessionPolicyArn: String?
        /// The ID of the Amazon EMR Studio.
        public let studioId: String?

        @inlinable
        public init(identityId: String? = nil, identityName: String? = nil, identityType: IdentityType? = nil, sessionPolicyArn: String? = nil, studioId: String? = nil) {
            self.identityId = identityId
            self.identityName = identityName
            self.identityType = identityType
            self.sessionPolicyArn = sessionPolicyArn
            self.studioId = studioId
        }

        public func validate(name: String) throws {
            try self.validate(self.identityId, name: "identityId", parent: name, max: 256)
            try self.validate(self.identityId, name: "identityId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.identityName, name: "identityName", parent: name, max: 256)
            try self.validate(self.identityName, name: "identityName", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.sessionPolicyArn, name: "sessionPolicyArn", parent: name, max: 256)
            try self.validate(self.sessionPolicyArn, name: "sessionPolicyArn", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.studioId, name: "studioId", parent: name, max: 256)
            try self.validate(self.studioId, name: "studioId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case identityId = "IdentityId"
            case identityName = "IdentityName"
            case identityType = "IdentityType"
            case sessionPolicyArn = "SessionPolicyArn"
            case studioId = "StudioId"
        }
    }

    public struct UsernamePassword: AWSDecodableShape {
        /// The password associated with the temporary credentials that you use to connect to cluster endpoints.
        public let password: String?
        /// The username associated with the temporary credentials that you use to connect to cluster endpoints.
        public let username: String?

        @inlinable
        public init(password: String? = nil, username: String? = nil) {
            self.password = password
            self.username = username
        }

        private enum CodingKeys: String, CodingKey {
            case password = "Password"
            case username = "Username"
        }
    }

    public struct VolumeSpecification: AWSEncodableShape & AWSDecodableShape {
        /// The number of I/O operations per second (IOPS) that the volume supports.
        public let iops: Int?
        /// The volume size, in gibibytes (GiB). This can be a number from 1 - 1024. If the volume type is EBS-optimized, the minimum value is 10.
        public let sizeInGB: Int?
        /// The throughput, in mebibyte per second (MiB/s). This optional parameter can be a number from 125 - 1000 and is valid only for gp3 volumes.
        public let throughput: Int?
        /// The volume type. Volume types supported are gp3, gp2, io1, st1, sc1, and standard.
        public let volumeType: String?

        @inlinable
        public init(iops: Int? = nil, sizeInGB: Int? = nil, throughput: Int? = nil, volumeType: String? = nil) {
            self.iops = iops
            self.sizeInGB = sizeInGB
            self.throughput = throughput
            self.volumeType = volumeType
        }

        public func validate(name: String) throws {
            try self.validate(self.throughput, name: "throughput", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case iops = "Iops"
            case sizeInGB = "SizeInGB"
            case throughput = "Throughput"
            case volumeType = "VolumeType"
        }
    }

    public struct Credentials: AWSDecodableShape {
        /// The username and password that you use to connect to cluster endpoints.
        public let usernamePassword: UsernamePassword?

        @inlinable
        public init(usernamePassword: UsernamePassword? = nil) {
            self.usernamePassword = usernamePassword
        }

        private enum CodingKeys: String, CodingKey {
            case usernamePassword = "UsernamePassword"
        }
    }
}

// MARK: - Errors

/// Error enum for EMR
public struct EMRErrorType: AWSErrorType {
    enum Code: String {
        case internalServerError = "InternalServerError"
        case internalServerException = "InternalServerException"
        case invalidRequestException = "InvalidRequestException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize EMR
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// Indicates that an error occurred while processing the request and that the request was not completed.
    public static var internalServerError: Self { .init(.internalServerError) }
    /// This exception occurs when there is an internal failure in the Amazon EMR service.
    public static var internalServerException: Self { .init(.internalServerException) }
    /// This exception occurs when there is something wrong with user input.
    public static var invalidRequestException: Self { .init(.invalidRequestException) }
}

extension EMRErrorType: AWSServiceErrorType {
    public static let errorCodeMap: [String: AWSErrorShape.Type] = [
        "InvalidRequestException": EMR.InvalidRequestException.self
    ]
}

extension EMRErrorType: Equatable {
    public static func == (lhs: EMRErrorType, rhs: EMRErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension EMRErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
